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 $val = shift;
# Check it is aligned to 32bits
# FIXME - compare against db->{sizes}{align}, not hardcoded
if (!$val & 0x3) {
# Check it is correctly aligned
# FIXME - this only works for binary values of alignment
if (($val & ($db->{sizes}{align}-1)) != 0) {
return undef;
}

Loading…
Cancel
Save