diff --git a/ChangeLog b/ChangeLog index 1e4a23b41d0e630ec0c71620fb561ac6e4bee12a..323a1a4593a3759a50a1a38810dcf3cd4f5a880b 100644 --- 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, diff --git a/src/chars.c b/src/chars.c index 3d57d38ba98e18b205103b0673c2cac0a6bea0f0..90808a91a3f2b24d24165c1767bd4d17c4cfc23a 100644 --- a/src/chars.c +++ b/src/chars.c @@ -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;