summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tools/sprite_dumper/common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/sprite_dumper/common.h b/tools/sprite_dumper/common.h index 2aca4fa..d9fb5da 100644 --- a/tools/sprite_dumper/common.h +++ b/tools/sprite_dumper/common.h
@@ -78,8 +78,11 @@ public:
78 int n = ((t >> 12) & 0xF) + 3; // num of bytes to copy 78 int n = ((t >> 12) & 0xF) + 3; // num of bytes to copy
79 int o = (t & 0xFFF); 79 int o = (t & 0xFFF);
80 80
81 memcpy(result.data() + bPos, result.data() + bPos - o - 1, n); 81 for (int j=0; j<n; j++) {
82 bPos += n; 82 if (bPos >= length) break;
83 result[bPos] = result[bPos - o - 1];
84 bPos++;
85 }
83 break; 86 break;
84 } 87 }
85 default: break; 88 default: break;