diff --git a/CodeHawk/CHB/bchlibelf/bCHELFSection.ml b/CodeHawk/CHB/bchlibelf/bCHELFSection.ml index dfad7a6e..b7ee2835 100644 --- a/CodeHawk/CHB/bchlibelf/bCHELFSection.ml +++ b/CodeHawk/CHB/bchlibelf/bCHELFSection.ml @@ -119,6 +119,8 @@ object (self) if Char.code s.[offset + len] = 0 then let str = String.sub s offset len in let new_s = string_replace '\n' "\\n" str in + let new_s = string_replace '\r' "\\r" new_s in + let new_s = string_replace '"' "\\\"" new_s in begin string_table#add_string va new_s; Some new_s diff --git a/CodeHawk/CHB/bchlibelf/bCHELFSegment.ml b/CodeHawk/CHB/bchlibelf/bCHELFSegment.ml index 677ef1e7..c7eefad8 100644 --- a/CodeHawk/CHB/bchlibelf/bCHELFSegment.ml +++ b/CodeHawk/CHB/bchlibelf/bCHELFSegment.ml @@ -87,6 +87,8 @@ object (self) if Char.code s.[offset+len] = 0 then let str = String.sub s offset len in let new_s = string_replace '\n' "\\n" str in + let new_s = string_replace '\r' "\\r" new_s in + let new_s = string_replace '"' "\\\"" new_s in begin string_table#add_string va new_s ; Some new_s