mirror of
https://github.com/hamishcoleman/thinkpad-ec
synced 2024-11-09 19:11:05 +00:00
Make alignment checks adjustable - coincidently fixing a bug with that test
This commit is contained in:
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…
Reference in New Issue
Block a user