aboutsummaryrefslogtreecommitdiff
path: root/quote.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-30 16:07:54 -0800
committerJunio C Hamano <junkio@cox.net>2006-10-30 16:07:54 -0800
commit8d63d95f297446fe110ea76d350ae15676e2ed54 (patch)
tree63ba65f877c06d239df812a9a1003eb489eb2ae1 /quote.c
parent4903161fb8c74bc583b21d7ffe7abaf223df4253 (diff)
downloadgit-8d63d95f297446fe110ea76d350ae15676e2ed54.tar.gz
git-8d63d95f297446fe110ea76d350ae15676e2ed54.tar.xz
quote.c: ensure the same quoting across platforms.
We read a byte from "char *" and compared it with ' ' to decide if it needs quoting to protect textual output. With a platform where char is unsigned char that would give different result. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'quote.c')
-rw-r--r--quote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quote.c b/quote.c
index e3a4d4aef..dc5c0a771 100644
--- a/quote.c
+++ b/quote.c
@@ -209,7 +209,7 @@ static int quote_c_style_counted(const char *name, int namelen,
if (!ch)
break;
if ((ch < ' ') || (ch == '"') || (ch == '\\') ||
- (ch == 0177)) {
+ (ch >= 0177)) {
needquote = 1;
switch (ch) {
case '\a': EMITQ(); ch = 'a'; break;