From b38e6d8bf3bcf040af4e15cada12c6ac5ec25aa6 Mon Sep 17 00:00:00 2001 From: fredb Date: Sat, 6 Dec 2008 23:01:24 +0000 Subject: [PATCH] Ugly hack to fix a memory corruption problem --- simgear/nasal/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/nasal/hash.c b/simgear/nasal/hash.c index b7571c42..1efe8fbc 100644 --- a/simgear/nasal/hash.c +++ b/simgear/nasal/hash.c @@ -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) -- 2.39.5