Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
299:74351bf23e5e | 300:0250220d8cdd |
---|---|
77 sprintf(prbuf, "%d %s potions", obj->o_count, | 77 sprintf(prbuf, "%d %s potions", obj->o_count, |
78 p_colors[obj->o_which]); | 78 p_colors[obj->o_which]); |
79 when FOOD: | 79 when FOOD: |
80 if (obj->o_which == 1) | 80 if (obj->o_which == 1) |
81 if (obj->o_count == 1) | 81 if (obj->o_count == 1) |
82 sprintf(pb, "A%s %s", vowelstr(fruit), fruit); | 82 sprintf(pb, "A%s %.76s", vowelstr(fruit), fruit); |
83 else | 83 else |
84 sprintf(pb, "%d %ss", obj->o_count, fruit); | 84 sprintf(pb, "%d %.66ss", obj->o_count, fruit); |
85 else | 85 else |
86 if (obj->o_count == 1) | 86 if (obj->o_count == 1) |
87 strcpy(pb, "Some food"); | 87 strcpy(pb, "Some food"); |
88 else | 88 else |
89 sprintf(pb, "%d rations of food", obj->o_count); | 89 sprintf(pb, "%d rations of food", obj->o_count); |