SCI: fixing valgrind issue in Script::initialiseClasses thx to wjp for valgrind testing
svn-id: r50446
This commit is contained in:
parent
6402d64419
commit
66fb9e7a90
1 changed files with 8 additions and 5 deletions
|
@ -410,12 +410,14 @@ void Script::initialiseClasses(SegManager *segMan) {
|
|||
if (!seeker)
|
||||
return;
|
||||
|
||||
uint16 marker;
|
||||
bool isClass;
|
||||
uint16 classpos = seeker - _buf;
|
||||
int16 species = 0;
|
||||
|
||||
while (true) {
|
||||
// In SCI0-SCI1, this is the segment type. In SCI11, it's a marker (0x1234)
|
||||
uint16 marker = READ_SCI11ENDIAN_UINT16(seeker);
|
||||
bool isClass;
|
||||
uint16 classpos = seeker - _buf;
|
||||
int16 species;
|
||||
marker = READ_SCI11ENDIAN_UINT16(seeker);
|
||||
|
||||
if (!marker)
|
||||
break;
|
||||
|
@ -425,7 +427,8 @@ void Script::initialiseClasses(SegManager *segMan) {
|
|||
species = READ_SCI11ENDIAN_UINT16(seeker + 10);
|
||||
} else {
|
||||
isClass = (marker == SCI_OBJ_CLASS);
|
||||
species = READ_SCI11ENDIAN_UINT16(seeker + 12);
|
||||
if (isClass)
|
||||
species = READ_SCI11ENDIAN_UINT16(seeker + 12);
|
||||
classpos += 12;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue