as on R5, return an error when *srcLen == 0 and set dstLen to 0

fix bug #120


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16294 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2006-02-08 13:47:33 +00:00
parent 340a36b304
commit 9fe8bb2d91
+2 -1
View File
@@ -31,7 +31,8 @@ convert_encoding(const char * from, const char * to,
if (*srcLen == 0) {
// nothing to do!
DEBPRINT(("nothing to do\n"));
return B_OK;
*dstLen = 0;
return B_ERROR;
}
iconv_t conversion = iconv_open(to,from);
if (conversion == (iconv_t)-1) {