X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/a8dad3d5bafadb9bca3335952462f05192a5059c..ed3be466d29841cfb0bdb317935f1c4e25a7b8dc:/emufs_gui/viewer.c?ds=sidebyside diff --git a/emufs_gui/viewer.c b/emufs_gui/viewer.c index bcae4bd..8905fa3 100644 --- a/emufs_gui/viewer.c +++ b/emufs_gui/viewer.c @@ -72,9 +72,9 @@ char *juntar_memoria(char *s1, char *s2, char *s3, int size1, int size2, int siz return NULL; } - if (s1) memcpy(salida, s1, size1); - if (s2) memcpy(salida+size2, s2, size2); - if (s3) memcpy(salida+size2+size3, s3, size3); + if (s1) memcpy(salida, s1, size1); else size1 = 0; + if (s2) memcpy(salida+size1, s2, size2); else size2 = 0; + if (s3) memcpy(salida+size1+size2, s3, size3); if (s1) free(s1); if (s2) free(s2); if (s3) free(s3);