From ddc4d7666874ce050d33ba6cc5781f08180776c5 Mon Sep 17 00:00:00 2001 From: Bohdan Shulyar Date: Sun, 4 Apr 2021 22:03:02 +0300 Subject: [PATCH] engine: common: add quote symbol escaping support (#411) --- .gitignore | 6 ++++++ engine/common/common.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index e6eb24dd..fe2a728f 100644 --- a/.gitignore +++ b/.gitignore @@ -326,3 +326,9 @@ __pycache__ *.vcproj *.sln *.vcxproj + +# Visual Studio Code +.vscode/* +*.code-workspace +.history/* +.cache/* \ No newline at end of file diff --git a/engine/common/common.c b/engine/common/common.c index 40096a41..e2c0dcd7 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -521,6 +521,12 @@ skipwhite: } data++; + if( c == '\\' && *data == '"' ) + { + token[len++] = (byte)*data++; + continue; + } + if( c == '\"' ) { token[len] = 0;