aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subsurface-core/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-core/file.c b/subsurface-core/file.c
index 8286ce9f5..d16fe535d 100644
--- a/subsurface-core/file.c
+++ b/subsurface-core/file.c
@@ -57,7 +57,7 @@ int readfile(const char *filename, struct memblock *mem)
if (ret < 0)
goto free;
buf[ret] = 0;
- if (ret == mem->size)
+ if (ret == (int)mem->size) // converting to int loses a bit but size will never be that big
goto out;
errno = EIO;
ret = -1;