From aa487e6c75a6a9bd70189707f977fd66ba9c12a7 Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Sun, 20 Aug 2006 03:11:12 +0000 Subject: This fixes 5 potential bugs where the conditional would always be true. git-svn-id: https://svn.musicpd.org/mpd/trunk@4659 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/charConv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/charConv.c') diff --git a/src/charConv.c b/src/charConv.c index 870e6c3e2..62fc5f68e 100644 --- a/src/charConv.c +++ b/src/charConv.c @@ -122,7 +122,7 @@ char *convStrDup(char *string) iconv(char_conv_iconv, &string, &inleft, &bufferPtr, &outleft); if (outleft == BUFFER_SIZE - || (err < 0 && errno != E2BIG)) { + || (err == -1L && errno != E2BIG)) { free(ret); return NULL; } -- cgit v1.2.3