From 0cb2bc2b23840d08a4985177b650ab58c929ec1f Mon Sep 17 00:00:00 2001 From: Darkvater Date: Wed, 10 Jan 2007 21:44:59 +0000 Subject: (svn r8044) Regression (r8038): Crash on allocating bridge memory (peter1138) --- src/heightmap.cpp | 2 +- src/newgrf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 57f4c30b1..85e5d34a3 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -249,7 +249,7 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map) return false; } - MallocT(map, info.width * info.height); + MallocT(/* NO & */map, info.width * info.height); if (*map == NULL) { ShowErrorMessage(STR_PNGMAP_ERR_MISC, STR_BMPMAP_ERROR, 0, 0); fclose(f); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 13fb45cdc..988698762 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1076,7 +1076,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int if (bridge->sprite_table == NULL) { /* Allocate memory for sprite table pointers and zero out */ - CallocT(bridge->sprite_table, 7); + CallocT(&bridge->sprite_table, 7); } for (; numtables-- != 0; tableid++) { -- cgit v1.2.3-70-g09d2