summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp2
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;
}