dwatteau / scummtr

Fan translation tools for SCUMM engine games
MIT License
23 stars 4 forks source link

fix: Fix unitialized _LOFFOffset member variable #42

Closed dwatteau closed 1 year ago

dwatteau commented 2 years ago

C26495 in MSVC reports that the _LOFFOffset member variable is left unitialized in LECFPack::LECFPack().

I think that it should also be added to LECFPack::LECFPack(const TreeBlock &block) and &LECFPack::operator=(const TreeBlock &block), but I need to make sure that it doesn't cause any regression, because I'm not very at ease with this part of the code.

dwatteau commented 1 year ago

I've merged this, since init() properly takes care of giving a valid value before it is used, anyway.