View Single Post
Old January 31, 2020, 06:58   #6
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Yes, in vanilla it's not causing a problem today. But it's a pothole for variants, or for vanilla should it try to increase that limit beyond 256.

I assume that once-upon-a-time all these fields were bytes, and somebody decided to increase the width of some depth fields like player->depth, but didn't do a complete job.

So now we have compiler warnings and if anybody tries to use the extra depth they'll have bugs. How should it be dealt with? Ignore the problem? Add a macro that checks & asserts if the value really does get truncated and casts otherwise? Or just fix it and break the save file?
eastwind is offline   Reply With Quote