changeset 5593:a9c58b8bd74a draft

(svn r8044) Regression (r8038): Crash on allocating bridge memory (peter1138)
author Darkvater <Darkvater@openttd.org>
date Wed, 10 Jan 2007 21:44:59 +0000
parents ac4c3d8c93ee
children 966ed79810d0
files src/heightmap.cpp src/newgrf.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/heightmap.cpp
+++ b/src/heightmap.cpp
@@ -249,7 +249,7 @@
 			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);
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1076,7 +1076,7 @@
 
 				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++) {