X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/381a5f98d66c8a3847d9918077a351b4813558fd..b7e442a0e29d6f54ce1287a9fe407fedb52de949:/emufs/common.c diff --git a/emufs/common.c b/emufs/common.c index f2dfc93..3906e05 100644 --- a/emufs/common.c +++ b/emufs/common.c @@ -46,6 +46,7 @@ long emufs_common_get_file_size(const char* filename, int* err) *err = EMUFS_ERROR_CANT_OPEN_FILE; return 0; } + fseek(file, 0, SEEK_END); file_size = ftell(file); fclose(file); if (file_size < 0) { @@ -55,4 +56,3 @@ long emufs_common_get_file_size(const char* filename, int* err) } return file_size; } -