diff rogue4/things.c @ 300:0250220d8cdd

Fix an assortment of compiler warnings. A few potential bugs were removed in the process. Much code cleanup remains to be done.
author John "Elwin" Edwards
date Fri, 22 Nov 2019 21:18:27 -0500
parents ded75a57405c
children e52a8a7ad4c5
line wrap: on
line diff
--- a/rogue4/things.c	Sun Feb 11 15:37:33 2018 -0500
+++ b/rogue4/things.c	Fri Nov 22 21:18:27 2019 -0500
@@ -79,9 +79,9 @@
 	when FOOD:
 	    if (obj->o_which == 1)
 		if (obj->o_count == 1)
-		    sprintf(pb, "A%s %s", vowelstr(fruit), fruit);
+		    sprintf(pb, "A%s %.76s", vowelstr(fruit), fruit);
 		else
-		    sprintf(pb, "%d %ss", obj->o_count, fruit);
+		    sprintf(pb, "%d %.66ss", obj->o_count, fruit);
 	    else
 		if (obj->o_count == 1)
 		    strcpy(pb, "Some food");