Changeset: db4f9bd0c1e1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=db4f9bd0c1e1
Modified Files:
        clients/src/mapiclient/mclient.mx
Branch: default
Log Message:

Fix regression in displying values containing newlines.

Displaying values with newlines happened to work by virtue of an
off-by-one error in the original trim code.
utf8skip now skips up to the newline, like strchr does, and the newline
is not printed, such that no garbled output is shown.


diffs (21 lines):

diff -r f8d35c60aea4 -r db4f9bd0c1e1 clients/src/mapiclient/mclient.mx
--- a/clients/src/mapiclient/mclient.mx Thu Aug 26 13:01:38 2010 +0200
+++ b/clients/src/mapiclient/mclient.mx Thu Aug 26 13:53:02 2010 +0200
@@ -447,7 +447,7 @@
                        while ((*s & 0xC0) == 0x80)
                                s++;
                } else if (*s == '\n')
-                       return s + 1;
+                       return s;
                else
                        s++;
                i--;
@@ -545,6 +545,8 @@
                                        if (trim == 1)
                                                while (isspace((int) *t))
                                                        t++;
+                                       if (trim == 2 && *t == '\n')
+                                               t++;
                                        rest[i] = *t ? t : 0;
                                        if (cutafter[i] == 0)
                                                rest[i] = NULL;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to