From 07692ff2b49ab52c4ae4635891b248ff5cde6ae2 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 8 Apr 2014 14:51:51 +0200 Subject: sfeed_frames: fix escaped string Signed-off-by: Hiltjo Posthuma --- sfeed_frames.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sfeed_frames.c b/sfeed_frames.c index 13e59d0..626fadf 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -44,23 +44,20 @@ cleanup(void) { static void printcontent(const char *s, FILE *fp) { const char *p; - int len = 0; for(p = s; *p; p++) { if(*p == '\\') { p++; if(*p == '\\') fputc('\\', fp); - else if(*p == 't' && len) + else if(*p == 't') fputc('\t', fp); - else if(*p == 'n' && len) + else if(*p == 'n') fputc('\n', fp); else fputc(*p, fp); /* unknown */ - len = 0; } else { fputc(*p, fp); - len++; } } } -- cgit v1.2.3