@@ -85,25 +85,25 @@ bool SpriteLoaderGrf::LoadSprite(SpriteL
if (num < 0) return WarnCorruptSprite(file_slot, file_pos, __LINE__);
for (; size > 0; size--) {
*dest = *(dest - data_offset);
dest++;
}
if (num != 0) return WarnCorruptSprite(file_slot, file_pos, __LINE__);
sprite->AllocateData(sprite->width * sprite->height);
/* When there are transparency pixels, this format has an other trick.. decode it */
/* When there are transparency pixels, this format has another trick.. decode it */
if (type & 0x08) {
for (int y = 0; y < sprite->height; y++) {
bool last_item = false;
/* Look up in the header-table where the real data is stored for this row */
int offset = (dest_orig[y * 2 + 1] << 8) | dest_orig[y * 2];
/* Go to that row */
dest = dest_orig + offset;
do {
if (dest + 2 > dest_orig + dest_size) {
free(sprite->data);