X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/87f4567d04c1fbe0b7d01ead5605417960c27cde..6d6d7068e6cde94ff373ccfd25f1f9533fc75e70:/src/blocksorting/main.c diff --git a/src/blocksorting/main.c b/src/blocksorting/main.c index c3ae302..f73ed12 100644 --- a/src/blocksorting/main.c +++ b/src/blocksorting/main.c @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) } data = malloc(sizeof(char)*len); - salida = malloc(sizeof(char)*(len+1)); + salida = malloc(sizeof(char)*(len+1+sizeof(unsigned long int)*2)); orig = malloc(sizeof(char)*(len+1)); salida[len] = '\0'; @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) bs_restore(orig, salida, k, i); printf("Orig : %s\n", orig); } else - fwrite(salida, 1, i, fp); + fwrite(salida, 1, i, stdout); } fclose(fp); bs_destroy(bs);