aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shells/fd/files/patch-string.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/shells/fd/files/patch-string.c b/shells/fd/files/patch-string.c
new file mode 100644
index 00000000000..c8c4348be1e
--- /dev/null
+++ b/shells/fd/files/patch-string.c
@@ -0,0 +1,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);