diff options
author | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
commit | 33be1ecfb1a9056b027d50d7b558cff87c5b744d (patch) | |
tree | d644a3831ca0947198b191fa3e4e8973d3a9786e /src/openttd.cpp | |
parent | 91ff74641060445dc1647bbf05baeb03b45c3099 (diff) | |
download | openttd-33be1ecfb1a9056b027d50d7b558cff87c5b744d.tar.xz |
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index c1a66a555..92181045f 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -120,7 +120,7 @@ void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize) fseek(in, 0, SEEK_END); len = ftell(in); fseek(in, 0, SEEK_SET); - if (len > maxsize || !MallocT(&mem, len + 1)) { + if (len > maxsize || (mem = MallocT<byte>(len + 1)) == NULL) { fclose(in); return NULL; } |