From: fredb Date: Sat, 6 Dec 2008 23:01:24 +0000 (+0000) Subject: Ugly hack to fix a memory corruption problem X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b38e6d8bf3bcf040af4e15cada12c6ac5ec25aa6;p=simgear.git Ugly hack to fix a memory corruption problem --- 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)