diff --git a/src/storage/generic/SDL_genericstorage.c b/src/storage/generic/SDL_genericstorage.c index 483ca5e28e..2694debd03 100644 --- a/src/storage/generic/SDL_genericstorage.c +++ b/src/storage/generic/SDL_genericstorage.c @@ -85,6 +85,8 @@ static bool GENERIC_ReadStorageFile(void *userdata, const char *path, void *dest // FIXME: Should SDL_ReadIO use u64 now...? if (SDL_ReadIO(stream, destination, (size_t)length) == length) { result = true; + } else { + SDL_SetError("File length did not exactly match the destination length"); } SDL_CloseIO(stream); } @@ -110,6 +112,8 @@ static bool GENERIC_WriteStorageFile(void *userdata, const char *path, const voi // FIXME: Should SDL_WriteIO use u64 now...? if (SDL_WriteIO(stream, source, (size_t)length) == length) { result = true; + } else { + SDL_SetError("Resulting file length did not exactly match the source length"); } SDL_CloseIO(stream); }