Whoops, need to actually copy inbuf SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Thu, 28 Jun 2007 06:53:09 +0000
branchSDL-1.2
changeset 3986 4f73308bbb32
parent 3985 2f8efcf14c83
child 3987 00486a9c2893
Whoops, need to actually copy inbuf
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);