mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
condense wav error reporing
This commit is contained in:
parent
356fcebf84
commit
9bdff96a2f
1 changed files with 2 additions and 7 deletions
|
@ -78,14 +78,9 @@ static int WAV_ReadChunkInfo(const fshandle_t *fh, char *name)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
len = FGetLittleLong(fh->file);
|
len = FGetLittleLong(fh->file);
|
||||||
if (len < 0)
|
if (len < 0 || (ftell(fh->file) + len) > (fh->start + fh->length))
|
||||||
{
|
{
|
||||||
//Con_Printf("WAV: Negative chunk length\n");
|
Con_DPrintf("bad \"%s\" chunk length (%d)\n", name, len);
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if ((ftell(fh->file) + len) > (fh->start + fh->length))
|
|
||||||
{
|
|
||||||
//Con_Printf("WAV: Chunk extends past end of file\n");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue