mirror of
https://github.com/golang/go
synced 2024-11-12 10:30:23 -07:00
string hash function faults w empty string
fixes maps[""] R=r OCL=20909 CL=20911
This commit is contained in:
parent
7dd62cb3bc
commit
e956429166
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user