diff options
author | pixel <pixel> | 2008-08-13 08:46:52 +0000 |
---|---|---|
committer | pixel <pixel> | 2008-08-13 08:46:52 +0000 |
commit | 3cc372481f9ffb2224d1d02a07918423aca5583b (patch) | |
tree | 938c131f25c963fa58190e867f49949825ebf2b7 | |
parent | 87bf6e392a949958752741bb571fa7d29705b69f (diff) |
SEEK_END needs to be checked against file_size instead
-rw-r--r-- | mpq-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -229,7 +229,7 @@ uint32_t mpqlib_seek(struct mpq_file_t * mpq_f, int32_t offset, enum mpqlib_file case MPQLIB_SEEK_END: if (offset > 0) offset = 0; - if ((mpq_f->cursor + offset) < 0) + if ((mpq_f->file_size + offset) < 0) offset = -mpq_f->cursor; mpq_f->cursor = mpq_f->file_size + offset; break; |