]> git.llucax.com Git - z.facultad/75.06/jacu.git/commitdiff
Cambio sugerido por nico.
authorLeandro Lucarella <llucax@gmail.com>
Sat, 26 Jun 2004 06:38:26 +0000 (06:38 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Sat, 26 Jun 2004 06:38:26 +0000 (06:38 +0000)
src/mtf/mtf.c

index 460b790d5a7c6cffe90b56c126657ddb178d2993..228fd8af1e4c6a87fe728d4fd7671d35145d7dd0 100644 (file)
@@ -25,7 +25,7 @@ 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));
        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));
+       memcpy(*_z, z, size*sizeof(unsigned char));
        for(i=0; i<len; i++){
                pos[i] = get_pos(z, size, datos[i]);
                if (pos[i] != 0) 
        for(i=0; i<len; i++){
                pos[i] = get_pos(z, size, datos[i]);
                if (pos[i] != 0)