diff src/stdlib/SDL_iconv.c @ 3986:4f73308bbb32 SDL-1.2

Whoops, need to actually copy inbuf
author Sam Lantinga <slouken@libsdl.org>
date Thu, 28 Jun 2007 06:53:09 +0000
parents 2f8efcf14c83
children 00486a9c2893
line wrap: on
line diff
--- 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);