summaryrefslogtreecommitdiff
path: root/src/tool/mapcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool/mapcache.c')
-rw-r--r--src/tool/mapcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index b3bfec01b..9c4fd2cbf 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -197,11 +197,12 @@ int find_map(char *name)
{
int i;
struct map_info info;
-
+ size_t fileReadCount;
+
fseek(map_cache_fp, sizeof(struct main_header), SEEK_SET);
for(i = 0; i < header.map_count; i++) {
- fread(&info, sizeof(info), 1, map_cache_fp);
+ fileReadCount = fread(&info, sizeof(info), 1, map_cache_fp);
if(strcmp(name, info.name) == 0) // Map found
return 1;
else // Map not found, jump to the beginning of the next map info header
@@ -291,7 +292,8 @@ int do_init(int argc, char** argv)
header.file_size = sizeof(struct main_header);
header.map_count = 0;
} else {
- fread(&header, sizeof(struct main_header), 1, map_cache_fp);
+ size_t fileReadCount;
+ fileReadCount = fread(&header, sizeof(struct main_header), 1, map_cache_fp);
header.file_size = GetULong((unsigned char *)&(header.file_size));
header.map_count = GetUShort((unsigned char *)&(header.map_count));
}