cato-a / CoDaM_MiscMod

Official MiscMod for CoDaM in Call of Duty 1.1
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

libcod branch: `_loadBans()` not loading all bans #29

Closed raphael12333 closed 4 months ago

raphael12333 commented 4 months ago

Hello

The _loadBans() function is not loading all the entries of miscmod_bans.dat

I think it's because its gsc fread function returns max 256 chars (see https://github.com/cod1dev/libcod1/blob/077359ab24f7f78e493836f88fabb32006cbc4c5/src/gsc_utils.cpp#L330)

I guess cmd_reportlist is affected too

I guess this fread function from zk_libcod was intended to be used in a loop

Do you think it would be better to use it in a loop or to modify it?

I remember having heard about some "max 1GB/chunk issue" with codextended, it seems to me it's related and a solution would be to use fread in a loop

Regards