summaryrefslogtreecommitdiff
path: root/src/StringEscape.h
Commit message (Collapse)AuthorAgeFilesLines
* stringescape: correct break condition of unescapexhe2019-01-161-1/+3
| | | | | unescape only makes the string shorter, so 1 byte for terminator 'NULL' is enough. also, i tidy the code a little.
* fix assertion error on huge string found in gnumericv0.0.2rofl0r2012-12-251-0/+7
the culprit is: gnumeric-1.10.17/po-functions/dz.po basically the code was wrongly checking for the end of the convert buffer, instead of the line buffer. this is no problem per se because the line buffer gets reset more often, but when the convertbuffer is bigger (like after this change) it wouldnt work correctly. i put the convert_buf functions into a separate translation unit and renamed them to escape and unescape to make it more clear what they're doing. also new: size checks for the escape functions. currently it will silently truncate the strings when the buffer runs out of space. this is sufficient for no-op style, but should be fixed at some point.