X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/0aa658449bef68a63ecc6ba2960f93810a8a8341..9e5f9df91ca96fb4cf179841cea17c9b4fb0f99c:/src/jacu.c diff --git a/src/jacu.c b/src/jacu.c index 2982b0f..8e74812 100644 --- a/src/jacu.c +++ b/src/jacu.c @@ -62,7 +62,7 @@ int main(int argc, char* argv[]) char *salida, *data, c; data = malloc(sizeof(char)*pagesize); /* Reservo lugar tambien para guardar el k */ - salida = malloc(sizeof(char)*(pagesize)+sizeof(unsigned long int)); + salida = malloc(sizeof(char)*(pagesize)+sizeof(unsigned long int)*2); bs = bs_create(pagesize); fp = fopen(argv[optind], "rb"); fp_out = fopen("tmp.comp", "wb"); @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) /* Hago el BS */ bs_solve(data, salida, bs, &k, i); /* Le aplico el MTF */ - mtf = jacu_mtf(salida, i+sizeof(unsigned long int)); + mtf = jacu_mtf(salida, i+sizeof(unsigned long int)*2); for(j=0; j