- delete BUILDART header if found.

This will otherwise cause problems down the line because these 8 bytes are ignored in the offsets.
This commit is contained in:
Christoph Oelckers 2019-10-19 00:26:43 +02:00
parent c6f973d05f
commit 4142d3792b

View file

@ -294,7 +294,10 @@ int BuildFiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
const uint8_t *artptr = artdata.Data(); const uint8_t *artptr = artdata.Data();
if (artdata.Size() > 16) if (artdata.Size() > 16)
{ {
if (memcmp(artptr, "BUILDART", 8) == 0) artptr += 8; if (memcmp(artptr, "BUILDART", 8) == 0)
{
artdata.Delete(0, 8);
}
// Only load the data if the header is present // Only load the data if the header is present
if (CountTiles(fn, artptr) > 0) if (CountTiles(fn, artptr) > 0)
{ {