jump was written off the end of binary code, fixed

This commit is contained in:
Torsten Ruger
2018-05-28 11:45:04 +03:00
parent 1c09d4202f
commit be1bc63ff2
10 changed files with 58 additions and 27 deletions

View File

@ -162,7 +162,6 @@ module Risc
code.each_word do |word|
@stream.write_unsigned_int_32( word || 0 )
end
write_ref_for( code.get_type )
log.debug "Code16 witten stream 0x#{@stream.length.to_s(16)}"
end
@ -180,7 +179,7 @@ module Risc
write_ref_for( string.get_type ) #ref
@stream.write_signed_int_32( str.length ) #int
@stream.write str
pad_after(str.length + 8 ) # type , length *4 == 12
pad_after(str.length + 8 ) # type , length
log.debug "String (0x#{string.length.to_s(16)}) stream 0x#{@stream.length.to_s(16)}"
end