diff options
Diffstat (limited to 'src/trans/codegen_c.cpp')
-rw-r--r-- | src/trans/codegen_c.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp index b578c09b..55b3ea1a 100644 --- a/src/trans/codegen_c.cpp +++ b/src/trans/codegen_c.cpp @@ -1975,9 +1975,8 @@ namespace { m_of << "\\x0" << (unsigned int)static_cast<uint8_t>(v); else m_of << "\\x" << (unsigned int)static_cast<uint8_t>(v); - // If the next character is a hex digit, - // close/reopen the string. - if( isxdigit(*(&v+1)) ) + // If the next character is a hex digit, close/reopen the string. + if( &v < &s.back() && isxdigit(*(&v+1)) ) m_of << "\"\""; } } |