diff urogue/monsters.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 c495a4f288c6
children e52a8a7ad4c5
line wrap: on
line diff
--- a/urogue/monsters.c	Sun Feb 11 15:37:33 2018 -0500
+++ b/urogue/monsters.c	Fri Nov 22 21:18:27 2019 -0500
@@ -1417,11 +1417,11 @@
         if (selection[i].count > 1)
             strcat(dbuf, "s");
 
-        sprintf(buffer, "%-50s Price:  %d", dbuf, selection[i].worth);
+        sprintf(buffer, "%-50.80s Price:  %d", dbuf, selection[i].worth);
         waddstr(hw, buffer);
     }
 
-    sprintf(buffer, "Purse:  %d", purse);
+    sprintf(buffer, "Purse:  %ld", purse);
     mvwaddstr(hw, nitems + 3, 0, buffer);
     mvwaddstr(hw, 0, 0, "How about one of the following goods? ");
     wrefresh(hw);