From e3893229d99dbbd905d98e623bbf2036a6524a05 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Fri, 12 Apr 2013 16:37:52 +0300 Subject: [PATCH] Fixups in shuffle_block. --- compat/compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compat/compat.c b/compat/compat.c index 47940d7836..e5432cf3dd 100644 --- a/compat/compat.c +++ b/compat/compat.c @@ -149,9 +149,9 @@ static void shuffle_block(char **begin, char **last, char **end) const char **tmp = (const char**)calloc(len, sizeof(const char*)); rarch_assert(tmp); - memcpy(tmp, begin, sizeof(tmp)); - memmove(begin, last, (end - last) * sizeof(char*)); - memcpy(end - len, tmp, sizeof(tmp)); + memcpy(tmp, begin, len * sizeof(const char*)); + memmove(begin, last, (end - last) * sizeof(const char*)); + memcpy(end - len, tmp, len * sizeof(const char*)); free(tmp); }