Whoops, need to actually copy inbuf

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402387
This commit is contained in:
Sam Lantinga 2007-06-28 06:53:09 +00:00
parent cc3fe2e639
commit 2fd06952d1

View file

@ -39,6 +39,7 @@ size_t SDL_iconv(SDL_iconv_t cd,
if ( inbuf && *inbuf && inbytesleft ) {
char *tmp = SDL_stack_alloc(char, *inbytesleft);
char *ptr = tmp;
SDL_memcpy(tmp, inbuf, *inbytesleft);
retCode = iconv(cd, &ptr, inbytesleft, outbuf, outbytesleft);
inbuf += (ptr - tmp);
SDL_stack_free(tmp);