From 6b3b47aa0bd2cd344a80ebaea7ab88dd605cc389 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 11 Mar 2010 20:59:05 +0000 Subject: [PATCH] Allow tabs and returns to occur in text-files svn path=/main/branches/prefix/; revision=15819 --- src/chpathtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chpathtool.c b/src/chpathtool.c index 4c9c0dad0..31b89fec8 100644 --- a/src/chpathtool.c +++ b/src/chpathtool.c @@ -147,7 +147,9 @@ static int chpath(const char *fi, const char *fo) { /* this is a very stupid assumption, but I don't know * anything better: if we find a byte that's out of * ASCII character scope, we assume this is binary */ - if (buf[pos] < ' ' || buf[pos] > '~') { + if ((buf[pos] < ' ' || buf[pos] > '~') && + strchr("\t\r\n", buf[pos]) == NULL) + { /* Make sure we don't mess up code, GCC for instance * hardcodes the result of strlen("string") in * object code. This means we can nicely replace -- 2.26.2