ref: b8e4e314cfa8d21657e58b46f3b7a81ecbca5d9f
parent: b7c49e62cc65298a6456cddce83988b4a6776888
author: Christopher Snowhill <kode54@gmail.com>
date: Tue Sep 12 12:45:25 EDT 2017
Handle effect lengths correctly when calculating entry count prior to allocation.
--- a/src/it/readoldpsm.c
+++ b/src/it/readoldpsm.c
@@ -245,9 +245,8 @@
if (flags & 0x80) ptr += 2;
if (flags & 0x40) ptr++;
if (flags & 0x20) {
- ptr++;
- if (*ptr == 40) ptr += 3;
- else ptr++;
+ if (*ptr == 40) ptr += 4;
+ else ptr += 2;
}
}
}