`SEEK_END` is correct - revert accidental change there.

This commit is contained in:
James Alan Nguyen 2022-03-20 17:18:54 +11:00
parent cbe74b26ad
commit 5e005262a5
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ bool SafeReader::seek(ssize_t where, int whence) {
break;
}
case SEEK_END: {
ssize_t finalSeek=curSeek-where;
ssize_t finalSeek=len-where;
if (finalSeek<0) return false;
if (finalSeek>(ssize_t)len) return false;
curSeek=finalSeek;