get rid of a visual studio build warning

lnt-arithmetic-overflow	A sub-expression may overflow before being assigned to a wider type
This commit is contained in:
nhmall
2025-09-30 12:35:18 -04:00
parent ef1174ed1b
commit bbc8578375

View File

@@ -4327,9 +4327,10 @@ dump_weights(void)
{
int i, cnt = 0, nmwidth = 49, mcount = NUMMONS, ocount = NUM_OBJECTS;
char nmbuf[BUFSZ], nmbufbase[BUFSZ];
size_t num_entries = (size_t) (mcount + ocount);
weightlist = (struct weight_table_entry *)
alloc(sizeof (struct weight_table_entry) * (mcount + ocount));
alloc(sizeof (struct weight_table_entry) * num_entries);
decl_globals_init();
init_objects();
for (i = 0; i < mcount; ++i) {