17 lines
437 B
Diff
17 lines
437 B
Diff
|
--- util-linux-2.12p/misc-utils/look.c.sep 2005-05-02 12:51:17.808227240 +0200
|
||
|
+++ util-linux-2.12p/misc-utils/look.c 2005-05-02 12:53:18.078943312 +0200
|
||
|
@@ -327,9 +327,12 @@
|
||
|
/* copy, ignoring things that should be ignored */
|
||
|
p = comparbuf;
|
||
|
i = stringlen;
|
||
|
- while(s2 < s2end && *s2 != '\n' && i--) {
|
||
|
+ while(s2 < s2end && *s2 != '\n' && i) {
|
||
|
if (!dflag || isalnum(*s2))
|
||
|
+ {
|
||
|
*p++ = *s2;
|
||
|
+ i--;
|
||
|
+ }
|
||
|
s2++;
|
||
|
}
|
||
|
*p = 0;
|