From 0a4a20138d286b4fe40f7c89e6b753862489ee00 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 28 Jun 2007 06:53:09 +0000 Subject: [PATCH] Whoops, need to actually copy inbuf --HG-- branch : SDL-1.2 --- src/stdlib/SDL_iconv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c index 245c4480c..326db9be3 100644 --- a/src/stdlib/SDL_iconv.c +++ b/src/stdlib/SDL_iconv.c @@ -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);