Fixups in shuffle_block.

This commit is contained in:
Hans-Kristian Arntzen 2013-04-12 16:37:52 +03:00
parent 4782522dbd
commit e3893229d9

View File

@ -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);
}