From 6bd021cecd013fe92dbd0fe3a19b8f82c99bcd9c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 4 May 2015 17:34:24 -0400 Subject: chardiff: correctly handle 0xFF byte --- chardiff_post.c | 4 ++-- chardiff_pre.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chardiff_post.c b/chardiff_post.c index 9aa1790..54679ed 100644 --- a/chardiff_post.c +++ b/chardiff_post.c @@ -1,9 +1,9 @@ -/* Copyright (C) 2011-2014 Luke Shumaker */ +/* Copyright (C) 2011-2015 Luke Shumaker */ #include int main (int argc, char* argv[]) { - char c; + int c; while ((c = getchar()) != EOF) { if (c=='\\') { char c2 = getchar(); diff --git a/chardiff_pre.c b/chardiff_pre.c index 9b334e1..2be38f5 100644 --- a/chardiff_pre.c +++ b/chardiff_pre.c @@ -1,9 +1,9 @@ -/* Copyright (C) 2011, 2013-2014 Luke Shumaker */ +/* Copyright (C) 2011, 2013-2015 Luke Shumaker */ #include int main (int argc, char* argv[]) { - char c; + int c; while ((c = getchar()) != EOF) { switch (c) { case '\n': puts("\\n"); break; -- cgit v1.2.3-2-g168b