X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/a293398508dd82716cabed67614d1692fe689457..449a99817174f7b3ce6c22060050a394aa3f5363:/src/mtf/mtf.c diff --git a/src/mtf/mtf.c b/src/mtf/mtf.c index 460b790..5bf5b39 100644 --- a/src/mtf/mtf.c +++ b/src/mtf/mtf.c @@ -24,14 +24,15 @@ unsigned char *jacu_mtf(unsigned char *datos, int len, unsigned char **_z, int * pos = (unsigned char *)malloc(len*sizeof(unsigned char)); z = jacu_buscar_z(datos, len, &size); - *_z = (unsigned char*)malloc(len*sizeof(unsigned char)); - memcpy(*_z, z, len*sizeof(unsigned char)); + *_z = (unsigned char*)malloc(size*sizeof(unsigned char)); + memcpy(*_z, z, size*sizeof(unsigned char)); for(i=0; i