fixing the binary code indexes

AGAIN, that third of all bugs, the off by one
This commit is contained in:
Torsten Ruger
2018-05-28 18:20:09 +03:00
parent 8ef1a471a4
commit 4b34546c11
5 changed files with 42 additions and 32 deletions

View File

@ -15,7 +15,7 @@ module Parfait
@memory[index]
end
# 1 -based index
# 0 -based index
def set_internal_word(index , value)
return super if index < self.class.type_length
raise "Word[#{index}] = nil" if( value.nil? and self.class != List)