summaryrefslogtreecommitdiffstats
path: root/src/core/FileMgr.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-08 13:51:50 +0100
committeraap <aap@papnet.eu>2021-01-08 13:51:50 +0100
commit223b49e3be40afa963a31e43f348d2e859c2e543 (patch)
tree73eeb0739a2a7b3c0401f5032cf055432e6fe8a2 /src/core/FileMgr.cpp
parentunused var (diff)
downloadre3-223b49e3be40afa963a31e43f348d2e859c2e543.tar
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.gz
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.bz2
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.lz
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.xz
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.zst
re3-223b49e3be40afa963a31e43f348d2e859c2e543.zip
Diffstat (limited to '')
-rw-r--r--src/core/FileMgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/FileMgr.cpp b/src/core/FileMgr.cpp
index 99923ddf..32aa4041 100644
--- a/src/core/FileMgr.cpp
+++ b/src/core/FileMgr.cpp
@@ -241,7 +241,7 @@ CFileMgr::SetDirMyDocuments(void)
}
ssize_t
-CFileMgr::LoadFile(const char *file, uint8 *buf, int unused, const char *mode)
+CFileMgr::LoadFile(const char *file, uint8 *buf, int maxlen, const char *mode)
{
int fd;
ssize_t n, len;
@@ -257,6 +257,7 @@ CFileMgr::LoadFile(const char *file, uint8 *buf, int unused, const char *mode)
return -1;
#endif
len += n;
+ assert(len < maxlen);
}while(n == 0x4000);
buf[len] = 0;
myfclose(fd);