kernel/libiconv: Compare a char with \0.
authorSascha Wildner <saw@online.de>
Thu, 18 Apr 2019 07:34:01 +0000 (09:34 +0200)
committerSascha Wildner <saw@online.de>
Thu, 18 Apr 2019 07:34:01 +0000 (09:34 +0200)
sys/libiconv/iconv_xlat16.c

index 59ec415..1a39209 100644 (file)
@@ -267,7 +267,7 @@ iconv_xlat16_conv(void *d2p, const char **inbuf,
                         * there is a case that inbuf char is a single
                         * byte char while inlen == 2
                         */
-                       if ((u_char)*(src+1) == 0 && !nullin ) {
+                       if ((u_char)*(src+1) == '\0' && !nullin ) {
                                src++;
                                ir--;
                        } else {