From 3fc9bd8952f73b41b35ba6fc5af2522114039ca4 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 22 Jan 2022 22:16:12 -0500 Subject: Fix size of padding counter CHIPS.EXE has an alignmentShift of 9 bits! --- tools/exe2ico.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } -- cgit 1.4.1