From: Ricardo Markiewicz Date: Sat, 19 Jun 2004 22:02:52 +0000 (+0000) Subject: Bugfixes X-Git-Tag: svn_import~150 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/4c52c296c61446bfe960f6ca64274d8245a92a06?hp=d02652e3b6a0c912464d28cd6cd966c26ac4dc37 Bugfixes --- diff --git a/otros/mtf/main.c b/otros/mtf/main.c index f864de3..7dd8ef5 100644 --- a/otros/mtf/main.c +++ b/otros/mtf/main.c @@ -20,7 +20,7 @@ int main(int argc, char *argv[] ) printf("%d ", pos[i]); printf("\n"); - free(z); + /* XXX free(z); <-- NUNCA SE USA! */ free(pos); return 0; diff --git a/otros/mtf/mtf.c b/otros/mtf/mtf.c index dd0c8ab..c89bfbe 100644 --- a/otros/mtf/mtf.c +++ b/otros/mtf/mtf.c @@ -51,7 +51,7 @@ char *jacu_buscar_z(char* datos, int len, int *size) if( no_pertenece(z, datos[i]) ){ j++; z = realloc(z, j*sizeof(char)); - z[j]=datos[i]; + z[j-1]=datos[i]; *size = j; } }