# HG changeset patch # User Sam Lantinga # Date 1183013589 0 # Node ID 4f73308bbb32beb56a1b534fb41f0b896a9be312 # Parent 2f8efcf14c835009156b1f17bd0a9cbe7aa63238 Whoops, need to actually copy inbuf diff -r 2f8efcf14c83 -r 4f73308bbb32 src/stdlib/SDL_iconv.c --- a/src/stdlib/SDL_iconv.c Thu Jun 28 06:47:35 2007 +0000 +++ b/src/stdlib/SDL_iconv.c Thu Jun 28 06:53:09 2007 +0000 @@ -39,6 +39,7 @@ 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);