Fix buffer overflow, fishing array bounds and Win64 compatibility

This commit is contained in:
savis
2025-12-24 02:12:52 +01:00
parent 5d8bce819c
commit 86b6aa4d95
3 changed files with 29 additions and 21 deletions

View File

@@ -179,10 +179,10 @@ void CShop::SetShopItems(TShopItemTable * pTable, BYTE bItemCount)
item.price = item_table->dwGold * item.count;
}
char name[36];
char name[128];
snprintf(name, sizeof(name), "%-20s(#%-5d) (x %d)", item_table->szName, (int) item.vnum, item.count);
sys_log(0, "SHOP_ITEM: %-36s PRICE %-5d", name, item.price);
sys_log(0, "SHOP_ITEM: %s PRICE %-5d", name, item.price);
++pTable;
}
}