瀏覽代碼

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;