summaryrefslogtreecommitdiff
path: root/src/heightmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/heightmap.cpp')
-rw-r--r--src/heightmap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/heightmap.cpp b/src/heightmap.cpp
index 85e5d34a3..adedc06b4 100644
--- a/src/heightmap.cpp
+++ b/src/heightmap.cpp
@@ -136,7 +136,7 @@ static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map)
}
if (map != NULL) {
- MallocT(/* NO & */map, info_ptr->width * info_ptr->height);
+ *map = MallocT<byte>(info_ptr->width * info_ptr->height);
if (*map == NULL) {
ShowErrorMessage(STR_PNGMAP_ERR_MISC, STR_PNGMAP_ERROR, 0, 0);
@@ -249,7 +249,7 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map)
return false;
}
- MallocT(/* NO & */map, info.width * info.height);
+ *map = MallocT<byte>(info.width * info.height);
if (*map == NULL) {
ShowErrorMessage(STR_PNGMAP_ERR_MISC, STR_BMPMAP_ERROR, 0, 0);
fclose(f);