]> git.wh0rd.org Git - nano.git/commitdiff
in mbstrchr(), detect the case where the character isn't found in the
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 15 Nov 2005 19:01:07 +0000 (19:01 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 15 Nov 2005 19:01:07 +0000 (19:01 +0000)
string more accurately

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3179 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/chars.c

index 1e4a23b41d0e630ec0c71620fb561ac6e4bee12a..323a1a4593a3759a50a1a38810dcf3cd4f5a880b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -107,6 +107,9 @@ CVS code -
          character as having the width of Unicode U+FFFD (Replacement
          Character) instead of having a width of zero, since display
          problems can crop up with the latter approach. (DLR)
+  mbstrchr()
+       - Detect the case where the character isn't found in the string
+         more accurately. (DLR)
 - cut.c:
   cut_line()
        - Since placewewant will always be zero after the line is cut,
index 3d57d38ba98e18b205103b0673c2cac0a6bea0f0..90808a91a3f2b24d24165c1767bd4d17c4cfc23a 100644 (file)
@@ -852,7 +852,7 @@ char *mbstrchr(const char *s, char *c)
 
        free(s_mb);
 
-       if (ws != wc)
+       if (*s == '\0')
            q = NULL;
 
        return (char *)q;