summary refs log tree commit diff
path: root/iconv/gconv_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconv/gconv_open.c')
-rw-r--r--iconv/gconv_open.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/iconv/gconv_open.c b/iconv/gconv_open.c
index 9deeb5363c..058bcd9e5d 100644
--- a/iconv/gconv_open.c
+++ b/iconv/gconv_open.c
@@ -1,5 +1,5 @@
 /* Find matching transformation algorithms and initialize steps.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -35,6 +35,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
   __gconv_t result = NULL;
   size_t cnt = 0;
   int res;
+  int conv_flags = 0;
   const char *errhand;
   const char *ignore;
   struct trans_struct *trans = NULL;
@@ -98,7 +99,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
 		}
 	      else if (__strcasecmp (tok, "IGNORE") == 0)
 		/* Set the flag to ignore all errors.  */
-		flags = __GCONV_IGNORE_ERRORS;
+		conv_flags |= __GCONV_IGNORE_ERRORS;
 	      else
 		{
 		  /* `tok' is possibly a module name.  We'll see later
@@ -246,7 +247,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
 		 output buffer.  */
 	      if (cnt < nsteps - 1)
 		{
-		  result->__data[cnt].__flags = flags;
+		  result->__data[cnt].__flags = conv_flags;
 
 		  /* Allocate the buffer.  */
 		  size = (GCONV_NCHAR_GOAL * steps[cnt].__max_needed_to);
@@ -264,7 +265,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
 	      else
 		{
 		  /* Handle the last entry.  */
-		  result->__data[cnt].__flags = flags | __GCONV_IS_LAST;
+		  result->__data[cnt].__flags = conv_flags | __GCONV_IS_LAST;
 
 		  break;
 		}