|
@@ -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);
|
|
|
}
|