Closed karastojko closed 11 months ago
please forget the code I suggested. It doesn't seem to work correctly.
@yjm6560 Thanks for the review, seems I cannot add you to the reviewers list. I have added also the escaping of the double backslash. Seems nothing is broken with this change, I'll check it a little bit more.
As i commented in #134,
\\
and\"
must be converted to\
and"
in quoted state. However the modified code seems only handle\"
. And it will callstd::string::back
on emptystd::string
if token is""
, which can cause undefined behavior. it would better to consider variable cases.I think below code may solve the problem.
I haven't even compiled this code, so please just refer to it. And please consider whether there are any other exceptional cases or if they may interfere with existing operation. If you think there's a better way than my suggestion, of course you're welcome to go with it.