@@ -87,7 +87,10 @@ void CDefHandler::openFromMemory(unsigned char *table, std::string name)
palette[it].F = 0;
}
- p = reinterpret_cast<unsigned char *>(de.blocks);
+ // The SDefEntryBlock starts just after the SDefEntry
+ p = reinterpret_cast<unsigned char *>(&de);
+ p += sizeof(de);
+
totalEntries=0;
for (unsigned int z=0; z<totalBlocks; z++)
{
@@ -47,7 +47,9 @@ struct SDefEntry {
unsigned char B;
} palette[256];
- struct SDefEntryBlock blocks[];
+ // SDefEntry is followed by a series of SDefEntryBlock
+ // This is commented out because VC++ doesn't accept C99 syntax.
+ //struct SDefEntryBlock blocks[];
};
// Def entry in file. Integer fields are all little endian and will