Fixed warning

This commit is contained in:
Souryo 2016-07-10 10:12:39 -04:00
parent f3bf2a631c
commit 2e83cb4db6

View file

@ -8,7 +8,7 @@ WRes MemBuffer_Read(CSzMemBuffer *p, void *data, size_t *size)
if(originalSize == 0)
return 0;
size_t length = (size_t)(p->pos + *size > p->size ? p->size - p->pos - 1 : *size);
size_t length = (size_t)(p->pos + (Int64)(*size) > p->size ? p->size - p->pos - 1 : *size);
memcpy(data, (char*)(p->buffer) + p->pos, length);
p->pos += length;
return 0;