From 8a7a5dad5d84a3afbfd6b5833d4c97bd146a4d70 Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Sun, 30 Dec 2012 20:37:13 +0000 Subject: [PATCH] PDCLIB-2 PDCLIB-12: ASCII codec correct off-by-one error --- opt/basecodecs/_PDCLIB_ascii.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opt/basecodecs/_PDCLIB_ascii.c b/opt/basecodecs/_PDCLIB_ascii.c index 2036eb3..ca70a66 100644 --- a/opt/basecodecs/_PDCLIB_ascii.c +++ b/opt/basecodecs/_PDCLIB_ascii.c @@ -18,7 +18,7 @@ static bool asciitoc32( { while(*p_outsz && *p_insz) { unsigned char c = **p_inbuf; - if(c > 128) + if(c > 127) return false; **p_outbuf = c; @@ -40,7 +40,7 @@ static bool c32toascii( { while(*p_outsz && *p_insz) { char32_t c = **p_inbuf; - if(c > 128) + if(c > 127) return false; **p_outbuf = c; -- 2.40.0