diff options
Diffstat (limited to 'backends/fs')
-rw-r--r-- | backends/fs/ds/ds-fs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp index 17a06f4229..dda176bbcc 100644 --- a/backends/fs/ds/ds-fs.cpp +++ b/backends/fs/ds/ds-fs.cpp @@ -567,7 +567,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) { return numItems; } else { // consolePrintf("Read past end of file: %d read out of %d\n", bytes / size, numItems); - if (bytes != size * numItems) readPastEndOfFile = true; + if ((size_t)bytes != size * numItems) readPastEndOfFile = true; return bytes / size; } return numItems; @@ -588,7 +588,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) { return bytes / size; } - if (handle->pos + size * numItems > handle->size) { + if ((size_t)(handle->pos + size * numItems) > handle->size) { numItems = (handle->size - handle->pos) / size; if (numItems < 0) numItems = 0; } |