summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfeed.c b/sfeed.c
index 1e0e925..553062f 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -380,7 +380,7 @@ string_print_encoded(String *s)
for (p = s->data; *p && isspace((int)*p); p++)
;
/* seek offset of trailing whitespace */
- for (e = p + strlen(p); e > p && isspace((int)*(e - 1)); e--)
+ for (e = s->data + s->len; e > p && isspace((int)*(e - 1)); e--)
;
for (; *p && p != e; p++) {
@@ -411,7 +411,7 @@ string_print_trimmed(String *s)
for (p = s->data; *p && isspace((int)*p); p++)
;
/* seek offset of trailing whitespace */
- for (e = p + strlen(p); e > p && isspace((int)*(e - 1)); e--)
+ for (e = s->data + s->len; e > p && isspace((int)*(e - 1)); e--)
;
for (; *p && p != e; p++) {