comparison 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
comparison
equal deleted inserted replaced
299:74351bf23e5e 300:0250220d8cdd
1415 strcat(dbuf, selection[i].name); 1415 strcat(dbuf, selection[i].name);
1416 1416
1417 if (selection[i].count > 1) 1417 if (selection[i].count > 1)
1418 strcat(dbuf, "s"); 1418 strcat(dbuf, "s");
1419 1419
1420 sprintf(buffer, "%-50s Price: %d", dbuf, selection[i].worth); 1420 sprintf(buffer, "%-50.80s Price: %d", dbuf, selection[i].worth);
1421 waddstr(hw, buffer); 1421 waddstr(hw, buffer);
1422 } 1422 }
1423 1423
1424 sprintf(buffer, "Purse: %d", purse); 1424 sprintf(buffer, "Purse: %ld", purse);
1425 mvwaddstr(hw, nitems + 3, 0, buffer); 1425 mvwaddstr(hw, nitems + 3, 0, buffer);
1426 mvwaddstr(hw, 0, 0, "How about one of the following goods? "); 1426 mvwaddstr(hw, 0, 0, "How about one of the following goods? ");
1427 wrefresh(hw); 1427 wrefresh(hw);
1428 1428
1429 /* Get rid of the monster */ 1429 /* Get rid of the monster */