Commit 73619c36 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Merged r3255:3256 from branches/SDL-1.2: stdlib problem with SDL_memcpy macro.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402522
parent f792ff23
......@@ -610,7 +610,6 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#endif /* MALLINFO_FIELD_TYPE */
#define memset SDL_memset
#define memcpy SDL_memcpy
#define malloc SDL_malloc
#define calloc SDL_calloc
#define realloc SDL_realloc
......@@ -3913,7 +3912,7 @@ internal_realloc(mstate m, void *oldmem, size_t bytes)
void *newmem = internal_malloc(m, bytes);
if (newmem != 0) {
size_t oc = oldsize - overhead_for(oldp);
memcpy(newmem, oldmem, (oc < bytes) ? oc : bytes);
SDL_memcpy(newmem, oldmem, (oc < bytes) ? oc : bytes);
internal_free(m, oldmem);
}
return newmem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment