[svn:DBD-Pg] r11819 - DBD-Pg/trunk

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
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 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.