From: arjen Date: Mon, 27 Oct 2003 11:26:43 +0000 (+0000) Subject: Backslashes are correctly escaped with another backslash X-Git-Tag: V0_0_9~24 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=2f3a3522fe31a4599ff564139665257e945f0ca8 Backslashes are correctly escaped with another backslash --- 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++;