]> pd.if.org Git - pdclib.old/commitdiff
PDCLIB-2 PDCLIB-12: ASCII codec correct off-by-one error
authorOwen Shepherd <owen.shepherd@e43.eu>
Sun, 30 Dec 2012 20:37:13 +0000 (20:37 +0000)
committerOwen Shepherd <owen.shepherd@e43.eu>
Sun, 30 Dec 2012 20:37:13 +0000 (20:37 +0000)
opt/basecodecs/_PDCLIB_ascii.c

index 2036eb382f58ff5d83b7a805d847cb02038cfce9..ca70a667af84069938925c81605a836c35883317 100644 (file)
@@ -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;