Преглед на файлове

iconv was not returning -1 on most failure

this broke most uses of iconv in real-world programs, especially
glib's iconv wrappers.
Rich Felker преди 14 години
родител
ревизия
2f0c415ceb
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/locale/iconv.c

+ 2 - 0
src/locale/iconv.c

@@ -559,9 +559,11 @@ ilseq:
 	goto end;
 toobig:
 	err = E2BIG;
+	x = -1;
 	goto end;
 starved:
 	err = EINVAL;
+	x = -1;
 end:
 	errno = err;
 	return x;