blob: c8c4348be1e28a6209a6259b48e43930c6438629 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
diff -ur ../old/FD-3.00f/string.c ./string.c
--- ../old/FD-3.00f/string.c Sat May 29 00:00:00 2010
+++ ./string.c Sat May 29 19:52:52 2010
@@ -43,7 +43,10 @@
{
for (; n-- > 0; s++) {
if (*s == c) return((char *)s);
- else if (iswchar(s, 0)) s++;
+ else if (iswchar(s, 0)) {
+ if (n-- <= 0) break;
+ s++;
+ }
}
return(NULL);
|