From: pjs Date: Thu, 25 Jan 2007 20:57:29 +0000 (+0000) Subject: fix %c in printf_fast, printf_fast_f and printf_tiny X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=42ff532e6577b0afc6cd286e8a2d272f8ad4a386;hp=fd1585554b77cef31505cd53e5f9cebbb9916502;p=fw%2Fsdcc fix %c in printf_fast, printf_fast_f and printf_tiny git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4598 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index cdcaafbb..c626756c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-01-25 Paul Stoffregen + * device/lib/printf_fast.c: fix %c, char promoted to int + * device/lib/printf_tiny.c: fix %c, char promoted to int + 2007-01-25 Paul Stoffregen * device/lib/printf_fast.c: fix float overflow check, bug #1525093 diff --git a/device/lib/printf_fast.c b/device/lib/printf_fast.c index 71281f4a..63a4308e 100644 --- a/device/lib/printf_fast.c +++ b/device/lib/printf_fast.c @@ -236,6 +236,7 @@ printf_format_u: printf_format_c: //cjne a, #'c', printf_format_x cjne a, #99, printf_format_x + dec r0 mov a, @r0 // Acc has the character to print dec r0 sjmp printf_char diff --git a/device/lib/printf_tiny.c b/device/lib/printf_tiny.c index 4d854385..3a889f40 100644 --- a/device/lib/printf_tiny.c +++ b/device/lib/printf_tiny.c @@ -131,6 +131,7 @@ printf_str_loop: printf_format_c: //cjne a, #'c', printf_format_d cjne a, #99, printf_format_d + dec r0 mov a, @r0 // Acc has the character to print dec r0 lcall printf_putchar