padding with space not zero

This commit is contained in:
Torsten Ruger 2014-05-28 14:27:37 +03:00
parent c01c19209a
commit e9720c4c54

View File

@ -30,7 +30,7 @@ module Vm
# rounding up to the next 4 (always adding one for zero pad) # rounding up to the next 4 (always adding one for zero pad)
pad = ((length / 4 ) + 1 ) * 4 - length pad = ((length / 4 ) + 1 ) * 4 - length
raise "#{pad} #{self}" unless pad >= 1 raise "#{pad} #{self}" unless pad >= 1
@string = str + "\x00" * pad @string = str + " " * pad
end end
def result= value def result= value