summaryrefslogtreecommitdiff
path: root/src/core/FileMgr.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-08 13:51:42 +0100
committeraap <aap@papnet.eu>2021-01-08 13:51:42 +0100
commit8be05679249367b39bcee1e07d6831d11918210b (patch)
treeab13259d150966afc431656d0db65c5870561c3d /src/core/FileMgr.cpp
parent824ca7599ce380a12af0f42b892b7994b31e8f96 (diff)
little fixes
Diffstat (limited to 'src/core/FileMgr.cpp')
-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);