From 2f3a3522fe31a4599ff564139665257e945f0ca8 Mon Sep 17 00:00:00 2001 From: arjen Date: Mon, 27 Oct 2003 11:26:43 +0000 Subject: [PATCH] Backslashes are correctly escaped with another backslash --- src/gcm_input/string_utils.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gcm_input/string_utils.cpp b/src/gcm_input/string_utils.cpp index 56010a1..f23daea 100644 --- a/src/gcm_input/string_utils.cpp +++ b/src/gcm_input/string_utils.cpp @@ -8,7 +8,7 @@ *********************** ** FILE NAME : string_utils.cpp ** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring -** VERSION NUMBER : $Revision: 1.1 $ +** VERSION NUMBER : $Revision: 1.2 $ ** ** DESCRIPTION : Utility functions for Strings ** @@ -26,14 +26,17 @@ /***************************** $Log: string_utils.cpp,v $ - Revision 1.1 2003-08-05 08:15:01 arjen + Revision 1.2 2003-10-27 11:26:43 arjen + Backslashes are correctly escaped with another backslash + + Revision 1.1 2003/08/05 08:15:01 arjen Debug output to the log stream instead of cerr. Fixed namespace problems in XPath searches of the DOM. Moved string utility functions to a separate file. *****************************/ -static const char *RCSID = "$Id: string_utils.cpp,v 1.1 2003-08-05 08:15:01 arjen Exp $"; +static const char *RCSID = "$Id: string_utils.cpp,v 1.2 2003-10-27 11:26:43 arjen Exp $"; #include @@ -59,7 +62,7 @@ String SQL_Escape(String s) for (i = 0; i < ~s; i++) { - if (s[i] == '\'') + if (s[i] == '\'' || s[i] == '\\') { s(i,0) = "\\"; i++; -- 2.11.0