diff options
| author | raysan5 <[email protected]> | 2017-02-11 23:17:56 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2017-02-11 23:17:56 +0100 |
| commit | afcd748fdf2d4f379f7a3be1706c1d6cd2ff504d (patch) | |
| tree | ab46e50df4cfb094bd951cdc6504f87513d1d244 /src/core.c | |
| parent | b4988777ef60b312632602d7591ab508f0c90ab2 (diff) | |
| download | raylib-afcd748fdf2d4f379f7a3be1706c1d6cd2ff504d.tar.gz raylib-afcd748fdf2d4f379f7a3be1706c1d6cd2ff504d.zip | |
Reviewed fread() usage around the code
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1025,14 +1025,14 @@ int StorageLoadValue(int position) { // Get file size fseek(storageFile, 0, SEEK_END); - int fileSize = ftell(storageFile); // Size in bytes + int fileSize = ftell(storageFile); // Size in bytes rewind(storageFile); if (fileSize < (position*4)) TraceLog(WARNING, "Storage position could not be found"); else { fseek(storageFile, (position*4), SEEK_SET); - fread(&value, 1, 4, storageFile); + fread(&value, 4, 1, storageFile); // Read 1 element of 4 bytes size } fclose(storageFile); |
