Skip to content

Commit 33dbcfb

Browse files
Fix colorset editor error on pre-7.2 game data
1 parent 14a511e commit 33dbcfb

File tree

1 file changed

+2
-2
lines changed
  • xivModdingFramework/Materials/FileTypes

1 file changed

+2
-2
lines changed

xivModdingFramework/Materials/FileTypes/STM.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public StainingTemplateEntry(byte[] data, int offset, EStainingTemplate template
249249
// No data.
250250
continue;
251251
}
252-
else
252+
else if (arraySize < numDyes)
253253
{
254254
// Indexed array, where we have [n] # of real entries,
255255
// then 254 one-byte index entries referencing those [n] entries.
@@ -402,7 +402,7 @@ public StainingTemplateFile(byte[] data, EStainingTemplate templateType)
402402
offset += oldFormat ? 2 : 4;
403403
}
404404

405-
const int _headerEntrySize = 8;
405+
int _headerEntrySize = oldFormat ? 4 : 8;
406406
var endOfHeader = (8 + (_headerEntrySize * entryCount));
407407

408408
for (int i = 0; i < entryCount; i++)

0 commit comments

Comments
 (0)