summaryrefslogtreecommitdiff
path: root/lib/unicore
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-06-07 21:38:01 -0600
committerKarl Williamson <public@khwilliamson.com>2012-06-08 10:39:22 -0600
commitc4f8b45fd6cf40ad27cc93374d8d0b9ea10de780 (patch)
tree232ab023b8ed80b453fac7a8ea018666b944d652 /lib/unicore
parent3d0c6d383d001e52d4d30e6c1499ce65d6e01345 (diff)
downloadperl-c4f8b45fd6cf40ad27cc93374d8d0b9ea10de780.tar.gz
mktables: Add error check for overloaded &=
This operation is not commutative, so should fail if the operands are swapped.
Diffstat (limited to 'lib/unicore')
-rw-r--r--lib/unicore/mktables10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index e7aa869ec6..4dc53eda23 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -6947,6 +6947,16 @@ sub trace { return main::trace(@_); }
'&=' => sub {
my $self = shift;
my $other = shift;
+ my $reversed = shift;
+
+ if ($reversed) {
+ Carp::my_carp_bug("Bad news. Can't cope with '"
+ . ref($other)
+ . ' &= '
+ . ref($self)
+ . "'. undef returned.");
+ return;
+ }
return if $self->carp_if_locked;
$self->_set_range_list($self->_range_list & $other);