]> git.llucax.com Git - z.facultad/75.06/jacu.git/commitdiff
Bugfixes
authorRicardo Markiewicz <gazer.arg@gmail.com>
Sat, 19 Jun 2004 22:02:52 +0000 (22:02 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Sat, 19 Jun 2004 22:02:52 +0000 (22:02 +0000)
otros/mtf/main.c
otros/mtf/mtf.c

index f864de3f18ca61ed12f4e5af65396ac66eb33da2..7dd8ef5da0a954cfb9cdd7f9f5ddb8e7b2bb7a3a 100644 (file)
@@ -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;
index dd0c8ab4b2b29c769bfde728ff0ee72c0bc29b48..c89bfbe43a24905d725396145595cf98646201fa 100644 (file)
@@ -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;
                }
        }