X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/f4f9947b91b6b8d3ec18eb66639c8f2825a8dc4c..fef03d51453b511c6355d53f1c4f5d06f1e8519e:/src/mtf/mtf.c?ds=inline diff --git a/src/mtf/mtf.c b/src/mtf/mtf.c index 92088c0..5bf5b39 100644 --- a/src/mtf/mtf.c +++ b/src/mtf/mtf.c @@ -16,26 +16,27 @@ void print_z(char *z, int len) fprintf(stderr, "\n"); } -char *jacu_mtf(char *datos, int len, char **_z, int *z_len) +unsigned char *jacu_mtf(unsigned char *datos, int len, unsigned char **_z, int *z_len) { - char *z; - char *pos; + unsigned char *z; + unsigned char *pos; int i, size; - pos = (char *)malloc(len*sizeof(char)); + pos = (unsigned char *)malloc(len*sizeof(unsigned char)); z = jacu_buscar_z(datos, len, &size); - *_z = (char*)malloc(len*sizeof(char)); - memcpy(*_z, z, len*sizeof(char)); + *_z = (unsigned char*)malloc(size*sizeof(unsigned char)); + memcpy(*_z, z, size*sizeof(unsigned char)); for(i=0; i