fix word indexes on arm

which affected offsets in the ruby side too
the hidden dead word needed accounting for
This commit is contained in:
Torsten Ruger
2015-11-19 16:40:00 +02:00
parent a8453c126d
commit aabde4b9a6
4 changed files with 14 additions and 15 deletions

View File

@ -1,11 +1,11 @@
class Word < Object
int correct_index(int index)
return index + 8
int _internal_index(int index)
return index + 12
end
int char_at(int index)
index = correct_index(index)
int get_char_at(int index)
index = _internal_index(index)
return get_internal_byte(index)
end
@ -15,7 +15,7 @@ class Word < Object
end
int set_char_at( int index , int val)
index = correct_index(index)
index = _internal_index(index)
return set_internal_byte(index , val)
end