diff options
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 03c5b30210f..dda60d533d5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -83,6 +83,15 @@ writeConstantValue(IceUtilInternal::Output& out, const TypePtr& type, const Synt } else { + switch(*c) + { + case '\\': + case '"': + { + out << "\\"; + break; + } + } out << *c; // Print normally if in basic source character set } } |