Explicit check for negative positions in PHYSFS_seek().

This commit is contained in:
Ryan C. Gordon 2001-07-23 07:15:21 +00:00
parent 1bed4abbaa
commit 2ea6feeb2b
1 changed files with 1 additions and 0 deletions

View File

@ -1281,6 +1281,7 @@ int PHYSFS_seek(PHYSFS_file *handle, int pos)
assert(h != NULL);
assert(h->funcs != NULL);
BAIL_IF_MACRO(h->funcs->seek == NULL, ERR_NOT_SUPPORTED, 0);
BAIL_IF_MACRO(pos < 0, ERR_INVALID_ARGUMENT, 0);
return(h->funcs->seek(h, pos));
} /* PHYSFS_seek */