forked from KolibriOS/kolibrios
iconv: fix case for target and source encoding being same
git-svn-id: svn://kolibrios.org@6894 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a4a06a81a0
commit
950ddc2a93
@ -110,6 +110,20 @@ size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft,
|
|||||||
default: return -3;
|
default: return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(from == to) {
|
||||||
|
int oc=0,ic=0;
|
||||||
|
|
||||||
|
while(*inbytesleft > 0 && *outbytesleft > 0) {
|
||||||
|
str[oc]=(*inbuf)[ic];
|
||||||
|
++ic;
|
||||||
|
++oc;
|
||||||
|
(*inbytesleft)--;
|
||||||
|
(*outbytesleft)--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
count1=0;
|
count1=0;
|
||||||
count2=0;
|
count2=0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user