From d7ed0858179813d8bd488ab28364088587f9ed59 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 26 Nov 2023 13:34:31 -0800 Subject: [PATCH] Fix mod storage integer overflow --- src/pc/mods/mod_storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pc/mods/mod_storage.c b/src/pc/mods/mod_storage.c index ab9b75c4..7fbe678a 100644 --- a/src/pc/mods/mod_storage.c +++ b/src/pc/mods/mod_storage.c @@ -47,12 +47,12 @@ bool char_valid(char* buffer) { return true; } -u32 key_count(char* filename) { +s32 key_count(char* filename) { FILE *file; file = fopen(filename, "r"); if (file == NULL) { return 0; } - u32 lines = 1; + s32 lines = 1; char c; do { c = fgetc(file);