From c3fbdf78c0ae926bf16a04d942f637c968ee9f32 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Sat, 5 Sep 2015 19:32:01 +0100 Subject: [PATCH] fix writing null terminators in config file --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 20f6ae2b7b..cd6219d53d 100644 --- a/src/config.c +++ b/src/config.c @@ -294,7 +294,7 @@ static void rwopsprintf(SDL_RWops *file, const char *format, ...) char buffer[64]; vsprintf(buffer, format, args); - SDL_RWwrite(file, buffer, strlen(buffer) + 1, 1); + SDL_RWwrite(file, buffer, strlen(buffer), 1); va_end(args); }