Fix word offset

which had weirdly been 1 off
(not weird that it was off, index bugs are common, but weird that the tests passed anyway)
This commit is contained in:
2019-09-24 12:58:31 +03:00
parent a446d3da6b
commit 7b9097a0b1
3 changed files with 5 additions and 5 deletions

View File

@ -139,7 +139,7 @@ module Parfait
raise "index not integer #{at.class}" unless at.is_a?(::Integer)
raise "index must be positive , not #{at}" if (index < 0)
raise "index too large #{at} > #{self.length}" if (index >= self.length )
return index + 8 # type_length * 4
return index + Word.type_length * 4
end
# compare the word to another