diff options
Diffstat (limited to 'lib/uniconv/u8-conv-to-enc.c')
-rw-r--r-- | lib/uniconv/u8-conv-to-enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uniconv/u8-conv-to-enc.c b/lib/uniconv/u8-conv-to-enc.c index bc2cc09c93..85404d4be9 100644 --- a/lib/uniconv/u8-conv-to-enc.c +++ b/lib/uniconv/u8-conv-to-enc.c @@ -1,5 +1,5 @@ /* Conversion from UTF-8 to legacy encodings. - Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -50,7 +50,7 @@ u8_conv_to_encoding (const char *tocode, #endif /* Memory allocation. */ - if (*resultp != NULL && *lengthp >= srclen) + if ((*resultp != NULL && *lengthp >= srclen) || srclen == 0) result = *resultp; else { |