Make alignment checks adjustable - coincidently fixing a bug with that test

asm
Hamish Coleman 8 years ago
parent 890d7e8252
commit 90ce5a1978

@ -238,9 +238,9 @@ sub validate_pointer {
my $db = shift; my $db = shift;
my $val = shift; my $val = shift;
# Check it is aligned to 32bits # Check it is correctly aligned
# FIXME - compare against db->{sizes}{align}, not hardcoded # FIXME - this only works for binary values of alignment
if (!$val & 0x3) { if (($val & ($db->{sizes}{align}-1)) != 0) {
return undef; return undef;
} }

Loading…
Cancel
Save