Fix latent bug in Nasal hash cget / cset functions, where the embedded string length

was set to an incorrect marker value.
This commit is contained in:
James Turner 2012-04-23 22:29:54 +01:00
parent 9a113bdb44
commit 0c13fb7ae4

View File

@ -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);