Page 1 of 1

PyPRP exporting invalid plRandomSoundMod?

PostPosted: Thu Mar 25, 2010 1:04 pm
by diafero
While validating all the fan ages available via UAM with libHSPLasma ("validating" as in "read & parse and look for errors or warning"s), I stumbled upon the same message in various ages (for example Camp Bravo and Prad):
[0079:<name>] Size-Read difference: 2 bytes
0079 is the type ID of plRandomSoundMod

Looking at the source code of PyPRP, libHSPlasma and Drizzle, the latter two expect the size of the array in that class to be a 2-byte value, while PyPRP uses the hsTArray.write function, which results in a 4-byte length value. I can't tell which one is correct, but since libHSPlasma reads all POTS ages without warning, this looks like a bug in PyPRP for me.

Re: PyPRP exporting invalid plRandomSoundMod?

PostPosted: Wed Apr 28, 2010 12:30 pm
by diafero
Could maybe someone who knows Cyan's actual implementation check whether PyPRP or libHSPlasma are at fault?

Re: PyPRP exporting invalid plRandomSoundMod?

PostPosted: Wed Apr 28, 2010 12:44 pm
by Branan
It's a short, if I'm looking at this correctly.