diff options
author | June McEnroe <june@causal.agency> | 2022-01-22 22:16:12 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-01-22 22:16:12 -0500 |
commit | 3fc9bd8952f73b41b35ba6fc5af2522114039ca4 (patch) | |
tree | 1e3681225e52bace418e201fc36316eb885348dc | |
parent | Add exe2ico extractor (diff) | |
download | wep-3fc9bd8952f73b41b35ba6fc5af2522114039ca4.tar.gz wep-3fc9bd8952f73b41b35ba6fc5af2522114039ca4.zip |
Fix size of padding counter
CHIPS.EXE has an alignmentShift of 9 bits!
Diffstat (limited to '')
-rw-r--r-- | tools/exe2ico.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/exe2ico.c b/tools/exe2ico.c index 5d92994..d84d3df 100644 --- a/tools/exe2ico.c +++ b/tools/exe2ico.c @@ -119,7 +119,11 @@ int main(int argc, char *argv[]) { dataOffset += -dataOffset & ((1 << alignmentShift) - 1); } // Padding before the first aligned data offset - for (Uint8 i = 0; i < (-iconDirLength & ((1 << alignmentShift) - 1)); ++i) { + for ( + Uint32 i = 0; + i < (-iconDirLength & ((1 << alignmentShift) - 1)); + ++i + ) { SDL_WriteU8(ico, 0); } |