# HG changeset patch # User Michael Pavone # Date 1429992338 25200 # Node ID 7101ad443081ca0952876130995fc1469aea1eb6 # Parent 06dceff348ea33092be4932438cb43954b77c875 Add null terminator to string literals in x86 module and fix a bug that interfered with use of function name labels in call instructions diff -r 06dceff348ea -r 7101ad443081 modules/x86.tp --- a/modules/x86.tp Thu Apr 23 19:24:20 2015 -0700 +++ b/modules/x86.tp Sat Apr 25 13:05:38 2015 -0700 @@ -256,11 +256,13 @@ data <- :bytes { #{ - length <- { bytes byte_length } + length <- { (bytes byte_length) + 1 } flattenTo:at <- :dest :idx { foreach: (range from: 0 to: length) :_ cidx { dest set: idx + cidx (bytes byte: cidx) } + //NULL terminator + dest set: idx + (bytes byte_length) 0u8 idx + length } string <- { @@ -471,6 +473,7 @@ length <- { 0 } hasOffset? <- { _offset >= 0 } offset <- { _offset } + isInteger? <- { false } register? <- { false } label? <- { true } flattenTo:at <- :dest :idx {