summaryrefslogtreecommitdiff
path: root/perllib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-05-25 18:17:49 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-05-25 18:17:49 -0700
commit14f9ea2925de991f74b2a66518a270a3529bebab (patch)
tree3dbec8b729a1a37bf7ae4178b535c150f2f887e3 /perllib
parentc593173e110244f99a3498cb3e23d6c3c07bae35 (diff)
downloadnasm-14f9ea2925de991f74b2a66518a270a3529bebab.tar.gz
nasm-14f9ea2925de991f74b2a66518a270a3529bebab.tar.bz2
nasm-14f9ea2925de991f74b2a66518a270a3529bebab.zip
phash: allow collisions if the hash target is the same
If the hash target is the same value, we can permit collisions. This isn't relevant for the current applications of the hash generator, but is useful for cases where one have a number of sources for the same target. It's easy to check, either way.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/phash.ph2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/phash.ph b/perllib/phash.ph
index 24f6a4f..4efc651 100644
--- a/perllib/phash.ph
+++ b/perllib/phash.ph
@@ -83,7 +83,7 @@ sub gen_hash_n($$$$) {
my $e = ${$href}{$k};
my $xkey;
- if (defined($xkey = $edges{$pf})) {
+ if (defined($xkey = $edges{$pf}) && ${$href}{$xkey} != $e) {
if (defined($run)) {
print STDERR "$run: Collision: $pf: $k with $xkey\n";
}