From: Owen Shepherd Date: Sun, 30 Dec 2012 20:37:13 +0000 (+0000) Subject: PDCLIB-2 PDCLIB-12: ASCII codec correct off-by-one error X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=commitdiff_plain;h=8a7a5dad5d84a3afbfd6b5833d4c97bd146a4d70 PDCLIB-2 PDCLIB-12: ASCII codec correct off-by-one error --- 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;