From 0c13fb7ae4012bdf9fc22087f15cc22848615a1a Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 23 Apr 2012 22:29:54 +0100 Subject: [PATCH] Fix latent bug in Nasal hash cget / cset functions, where the embedded string length was set to an incorrect marker value. --- simgear/nasal/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/nasal/hash.c b/simgear/nasal/hash.c index 1efe8fbc..bb7ce785 100644 --- a/simgear/nasal/hash.c +++ b/simgear/nasal/hash.c @@ -179,7 +179,8 @@ void naiGCMarkHash(naRef hash) static void tmpStr(naRef* out, struct naStr* str, const char* key) { str->type = T_STR; - str->hashcode = str->emblen = 0; + str->hashcode = 0; + str->emblen = -1; str->data.ref.ptr = (unsigned char*)key; str->data.ref.len = strlen(key); SETPTR(*out, str); -- 2.39.5