summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-04-13 13:12:11 +0200
committerJose <jose@zeroc.com>2011-04-13 13:12:11 +0200
commitff77cd1e6d0d3c972db43e3f4064937e251dbe13 (patch)
tree79e6a0db64ef51070e053d28a74b05aca602f485 /cpp/src/slice2cpp/Gen.cpp
parent5009 - appName incosistence (diff)
downloadice-ff77cd1e6d0d3c972db43e3f4064937e251dbe13.tar.bz2
ice-ff77cd1e6d0d3c972db43e3f4064937e251dbe13.tar.xz
ice-ff77cd1e6d0d3c972db43e3f4064937e251dbe13.zip
4851 - slice2cpp bug for string literals
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp9
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
}
}