Commit 2fd06952 authored by Sam Lantinga's avatar Sam Lantinga

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
parent cc3fe2e6
...@@ -39,6 +39,7 @@ size_t SDL_iconv(SDL_iconv_t cd, ...@@ -39,6 +39,7 @@ size_t SDL_iconv(SDL_iconv_t cd,
if ( inbuf && *inbuf && inbytesleft ) { if ( inbuf && *inbuf && inbytesleft ) {
char *tmp = SDL_stack_alloc(char, *inbytesleft); char *tmp = SDL_stack_alloc(char, *inbytesleft);
char *ptr = tmp; char *ptr = tmp;
SDL_memcpy(tmp, inbuf, *inbytesleft);
retCode = iconv(cd, &ptr, inbytesleft, outbuf, outbytesleft); retCode = iconv(cd, &ptr, inbytesleft, outbuf, outbytesleft);
inbuf += (ptr - tmp); inbuf += (ptr - tmp);
SDL_stack_free(tmp); SDL_stack_free(tmp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment