mirror of
https://github.com/facebook/zstd.git
synced 2025-10-06 00:04:13 -04:00
fixed wrong assert condition
This commit is contained in:
parent
a1d7b9d654
commit
6c0bfc468c
@ -120,16 +120,16 @@ static int ZSTD_seekable_seek_buff(void* opaque, long long offset, int origin)
|
||||
buffWrapper_t* const buff = (buffWrapper_t*) opaque;
|
||||
unsigned long long newOffset;
|
||||
assert(buff != NULL);
|
||||
assert(offset >= 0);
|
||||
switch (origin) {
|
||||
case SEEK_SET:
|
||||
assert(offset >= 0);
|
||||
newOffset = (unsigned long long)offset;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
newOffset = (unsigned long long)buff->pos + (unsigned long long)offset;
|
||||
newOffset = (unsigned long long)((long long)buff->pos + offset);
|
||||
break;
|
||||
case SEEK_END:
|
||||
newOffset = (unsigned long long)buff->size + (unsigned long long)offset;
|
||||
newOffset = (unsigned long long)((long long)buff->size + offset);
|
||||
break;
|
||||
default:
|
||||
assert(0); /* not possible */
|
||||
|
Loading…
x
Reference in New Issue
Block a user