forked from mia/Aegisub
Fix incorrect scope of variable in mkv_wrap.cpp
Worked by coincidence since the required value was left on the stack. CID #1111282.
This commit is contained in:
parent
9936bf0eca
commit
da5445a09f
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue