1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

fixed a silly bug in the internal UTF8 implementation

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 4b35a3494c
commit 95a9a1814f

View File

@ -63,8 +63,22 @@ size_t smb_iconv(smb_iconv_t cd,
#ifdef HAVE_NATIVE_ICONV
if (cd->cd) {
size_t ret;
#if 0
char *p = *outbuf;
char *q = *inbuf;
int inlen=*inbytesleft, outlen=*outbytesleft;
#endif
ret = iconv(cd->cd, inbuf, inbytesleft, outbuf, outbytesleft);
#if 0
if (strstr(p, "foo") || strstr(q, "foo")) {
DEBUG(0,("Foo 2!\n"));
dump_data(0, p, outlen - *outbytesleft);
dump_data(0, q, inlen - *inbytesleft);
}
#endif
/* if there was an error then reset the internal state,
this ensures that we don't have a shift state remaining for
character sets like SJIS */
@ -445,7 +459,6 @@ static size_t utf8_push(char **inbuf, size_t *inbytesleft,
}
(*outbuf)[0] = (*inbuf)[0];
(*inbytesleft) -= 2;
(*outbytesleft) -= len;
(*inbuf) += 2;