From 613c43f8bc580c48a5a4d8078b83360e29483b38 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 11 Dec 2006 15:56:13 +0000 Subject: [PATCH] * value-labels.c (hash_int_val_lab): Only hash as many bytes as the value label's width. --- src/data/ChangeLog | 5 +++++ src/data/value-labels.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/data/ChangeLog b/src/data/ChangeLog index bbbda1b7..dacd90ac 100644 --- a/src/data/ChangeLog +++ b/src/data/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 11 07:53:39 2006 Ben Pfaff + + * value-labels.c (hash_int_val_lab): Only hash as many bytes as + the value label's width. + Sun Dec 10 14:21:29 2006 Ben Pfaff * sfm-private.h: Move contents into sys-file-writer.c, which is diff --git a/src/data/value-labels.c b/src/data/value-labels.c index 81bb375e..9f058ad6 100644 --- a/src/data/value-labels.c +++ b/src/data/value-labels.c @@ -403,7 +403,7 @@ hash_int_val_lab (const void *vl_, const void *vls_) if (vls->width == 0) return hsh_hash_double (vl->value.f); else - return hsh_hash_bytes (vl->value.s, sizeof vl->value.s); + return hsh_hash_bytes (vl->value.s, vls->width); } /* Free a value label. */ -- 2.30.2