[PATCH 2/6] libc/iconv: Check ces handlers table value in euc_from_ucs_init

Keith Packard via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Need to check the value returned from
_iconv_from_ucs_ces_handlers_table.init -- the test was
incorrectly comparing the array holding the value.

Signed-off-by: Keith Packard <[email protected]>
---
 newlib/libc/iconv/ces/euc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/iconv/ces/euc.c b/newlib/libc/iconv/ces/euc.c
index ebd7091b0..56c0c6a6c 100644
--- a/newlib/libc/iconv/ces/euc.c
+++ b/newlib/libc/iconv/ces/euc.c
@@ -149,7 +149,7 @@ ok:
       data->data[i] = _iconv_from_ucs_ces_handlers_table.init (
                                                         rptr,
                                                         data->desc[i].csname);
-      if (data->data == NULL)
+      if (data->data[i] == NULL)
         goto error;
     } 
 
-- 
2.28.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.