]> git.mxchange.org Git - simgear.git/commitdiff
Ugly hack to fix a memory corruption problem
authorfredb <fredb>
Sat, 6 Dec 2008 23:01:24 +0000 (23:01 +0000)
committerfredb <fredb>
Sat, 6 Dec 2008 23:01:24 +0000 (23:01 +0000)
simgear/nasal/hash.c

index b7571c42058dc82e79a27e8ac7548170a7eeac4e..1efe8fbcee5e4c62ceaba083df54c6d3334ed958 100644 (file)
@@ -98,7 +98,7 @@ static int recsize(int lgsz)
 {
     HashRec hr;
     hr.lgsz = lgsz;
-    return (int)((char*)&TAB(&hr)[POW2(lgsz+1)] - (char*)&hr);
+    return (int)((char*)&TAB(&hr)[POW2(lgsz+1)] - (char*)&hr) + sizeof(naRef);
 }
 
 static HashRec* resize(struct naHash* hash)