diff --git a/aegisub/src/mkv_wrap.cpp b/aegisub/src/mkv_wrap.cpp index bbaa1d222..2867b6d70 100644 --- a/aegisub/src/mkv_wrap.cpp +++ b/aegisub/src/mkv_wrap.cpp @@ -265,8 +265,9 @@ longlong StdIoScan(InputStream *st, ulonglong start, unsigned signature) { return -1; int c; + unsigned cmp = 0; while ((c = getc(fp)) != EOF) { - unsigned cmp = ((cmp << 8) | c) & 0xffffffff; + cmp = ((cmp << 8) | c) & 0xffffffff; if (cmp == signature) return std_ftell(fp) - 4; }