Commit e9564291 authored by Ken Thompson's avatar Ken Thompson

string hash function faults w empty string

fixes maps[""]

R=r
OCL=20909
CL=20911
parent 7dd62cb3
......@@ -583,6 +583,8 @@ static uint64
stringhash(uint32 s, string *a)
{
USED(s);
if(*a == nil)
return memhash(emptystring->len, emptystring->str);
return memhash((*a)->len, (*a)->str);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment