> +// find number of characters in indent, p must be at beginning of line
> +static size_t indent_len(char *p)
> +{
> + char *r;
> +
> + for (r = p; r < end_line(p) && isblank(*r); ++r)
> + ;
> + return r - p;
> +}
Applied with the following change:
+ for (r = p; r < (end - 1) && isblank(*r); ++r)
+ ;
I hope I don't miss some subtlety which requires end_line(p)?
(then transformed to equivalent
+ r = p;
+ while (r < (end - 1) && isblank(*r))
+ r++;
)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox