From 6ea45db0df676b529758ad26398f03b3a93974dc Mon Sep 17 00:00:00 2001 From: manongjohn Date: Oct 11 2019 17:27:22 +0000 Subject: Handle escaped backslash at end of string --- diff --git a/toonz/sources/common/tstream/tstream.cpp b/toonz/sources/common/tstream/tstream.cpp index b56e558..7eb57fb 100644 --- a/toonz/sources/common/tstream/tstream.cpp +++ b/toonz/sources/common/tstream/tstream.cpp @@ -1074,15 +1074,15 @@ TIStream &TIStream::operator>>(TFilePath &v) { is.get(c); if (c == '"') { is.get(c); - bool escapedChar = false; + bool escapeChar = false; // If processing double-quote ("), if it's escaped, keep reading. - while (is && (c != '"' || escapedChar)) { + while (is && (c != '"' || escapeChar)) { // if(c=='\\') // is.get(c); - if (c == '\\') - escapedChar = true; + if (c == '\\' && !escapeChar) + escapeChar = true; else - escapedChar = false; + escapeChar = false; s.append(1, c); is.get(c); }