After recent Hearthstone upgrade to version 19.0.0.66927, Track-o-Bot stopped correctly parsing version information:
DEBUG: Detected build: 1391
DEBUG: Download cards.json from: https://api.hearthstonejson.com/v1/1391/enUS/cards.json
INFO: Couldn't download card DB: https://api.hearthstonejson.com/v1/1391/enUS/cards.json. Maybe current HS version is too new.
Looking at PeVersionExtractor we see the following code:
version = ( fileinfo.Value.dwFileVersionLS >> 0 ) & 0xffff;
Version 66927 = 0x1056F, so masking it by 0xFFFF gives 0x56F = 1391.
I don't know what the purpose of this mask is/was. dwFileVersionLS field is declared as a dword, and version variable is an int, so the mask doesn't seem to be needed for anything. (Or maybe it should be changed to 0x7FFFFFFF, since dwFileVersionLS is unsigned while version is signed.)
With the mask removed, correct version is returned:
After recent Hearthstone upgrade to version 19.0.0.66927, Track-o-Bot stopped correctly parsing version information:
Looking at
PeVersionExtractor
we see the following code:Version 66927 = 0x1056F, so masking it by 0xFFFF gives 0x56F = 1391.
I don't know what the purpose of this mask is/was.
dwFileVersionLS
field is declared as a dword, andversion
variable is an int, so the mask doesn't seem to be needed for anything. (Or maybe it should be changed to 0x7FFFFFFF, sincedwFileVersionLS
is unsigned whileversion
is signed.)With the mask removed, correct version is returned: