From 9bd3c08e9c2826e48167b4a1ce7280873cf83bbd Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 5 Apr 2020 00:00:56 +0900 Subject: physfs-serve: fix null termination --- jni/physfs-serve-sdl-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jni/physfs-serve-sdl-wrap.c') diff --git a/jni/physfs-serve-sdl-wrap.c b/jni/physfs-serve-sdl-wrap.c index ccdbce4..c0de9df 100644 --- a/jni/physfs-serve-sdl-wrap.c +++ b/jni/physfs-serve-sdl-wrap.c @@ -126,7 +126,7 @@ path_rewrite(struct physfs_serve *serve, char buf[], const size_t bufsz, struct buf[strlen(buf) - 1] = 'm'; if (st->filetype == -1 && PHYSFS_stat(buf, st)) return false; } else if (physfs_ends_with(buf, ".webm")) { - buf[strlen(buf) - 1] = '0'; + buf[strlen(buf) - 1] = 0; buf[strlen(buf) - 2] = '4'; buf[strlen(buf) - 3] = 'p'; buf[strlen(buf) - 4] = 'm'; -- cgit v1.2.3