Skip to content

Commit 627be84

Browse files
committed
Fix warnings on printf'ing size_t as %d
1 parent e8a9443 commit 627be84

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/ItemStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void ItemStorage::setItems(string s) {
5858
storage[i].quantity = 0;
5959
}
6060
else if ((unsigned)storage[i].item > items->items.size()-1) {
61-
fprintf(stderr, "Item id (%d) out of bounds 1-%d, skipping\n", storage[i].item, items->items.size());
61+
fprintf(stderr, "Item id (%d) out of bounds 1-%d, skipping\n", storage[i].item, (int)items->items.size());
6262
storage[i].item = 0;
6363
storage[i].quantity = 0;
6464
}

src/SaveLoad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void GameStatePlay::loadGame() {
262262
hotkeys[i] = 0;
263263
}
264264
else if ((unsigned)hotkeys[i] > powers->powers.size()-1) {
265-
fprintf(stderr, "Hotkey power id (%d) out of bounds 1-%d, skipping\n", hotkeys[i], powers->powers.size());
265+
fprintf(stderr, "Hotkey power id (%d) out of bounds 1-%d, skipping\n", hotkeys[i], (int)powers->powers.size());
266266
hotkeys[i] = 0;
267267
}
268268
else if (hotkeys[i] != 0 && powers->powers[hotkeys[i]].name == "") {

0 commit comments

Comments
 (0)