Author: turnstep
Date: Thu Sep 18 12:10:52 2008
New Revision: 11819

Modified:
   DBD-Pg/trunk/quote.c

Log:
Correctly quote high bytea chars. Thanks to Rod Taylor.


Modified: DBD-Pg/trunk/quote.c
==============================================================================
--- DBD-Pg/trunk/quote.c        (original)
+++ DBD-Pg/trunk/quote.c        Thu Sep 18 12:10:52 2008
@@ -205,7 +205,7 @@
                        *result++ = '\\';
                }
                else if (*string < 0x20 || *string > 0x7e) {
-                       (void) snprintf((char *)result, 6, "\\\\%03o", 
*string++);
+                       (void) snprintf((char *)result, 6, "\\\\%03o", 
(unsigned char)*string++);
                        result += 5;
                }
                else {

Reply via email to