summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-01-22 22:16:12 -0500
committerJune McEnroe <june@causal.agency>2022-01-22 22:16:12 -0500
commit3fc9bd8952f73b41b35ba6fc5af2522114039ca4 (patch)
tree1e3681225e52bace418e201fc36316eb885348dc
parentAdd exe2ico extractor (diff)
downloadwep-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.c6
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);
 	}