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:
parent
cc3fe2e639
commit
2fd06952d1
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue