]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix float64 hash
authorRuss Cox <rsc@golang.org>
Mon, 30 Jan 2012 16:10:59 +0000 (11:10 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 30 Jan 2012 16:10:59 +0000 (11:10 -0500)
R=ken2
CC=golang-dev
https://golang.org/cl/5580046

src/pkg/runtime/alg.c

index 56ec2d69e698a3aaba28844a36d2ccd7ff480859..eec523aad4dd589449d5175ae63d7a6938df5058 100644 (file)
@@ -263,7 +263,7 @@ runtimeĀ·f64hash(uintptr *h, uintptr s, void *a)
        uint64 u;
 
        USED(s);
-       f = *(float32*)a;
+       f = *(float64*)a;
        if(f == 0)
                hash = 0;       // +0, -0
        else if(f != f)