hash-functions: Avoid signed integer overflow.
[pspp] / src / libpspp / hash-functions.c
index 7a8d8162ecaa5f364c984c1a42827994a7cdfd64..4de7f777912ac7a1240c1d2abf4a699e05f7a8e1 100644 (file)
@@ -125,7 +125,7 @@ hash_double (double d, unsigned int basis)
       uint32_t tmp[2];
       uint32_t a, b, c;
 
-      a = b = c = 0xdeadbeef + 8 + basis;
+      a = b = c = 0xdeadbeefU + 8 + basis;
 
       memcpy (tmp, &d, 8);
       a += tmp[0];