--- rpl/src/instructions_s1.c 2019/01/28 15:34:25 1.94 +++ rpl/src/instructions_s1.c 2019/01/29 07:51:19 1.95 @@ -3415,8 +3415,8 @@ instruction_syseval(struct_processus *s_ unsigned char *tampon; integer8 longueur_lecture; + integer8 longueur_lue; integer8 longueur_tampon; - integer8 nombre_iterations; integer8 nombre_lignes; integer8 pointeur; integer8 registre_position_courante; @@ -3968,8 +3968,8 @@ instruction_syseval(struct_processus *s_ } longueur_lecture = 65536; + longueur_lue = 0; pointeur = 0; - nombre_iterations = 1; if ((tampon = malloc(((size_t) (longueur_lecture + 1)) * sizeof(unsigned char))) == NULL) @@ -4004,12 +4004,12 @@ instruction_syseval(struct_processus *s_ return; } + longueur_lue += ios; tampon[pointeur + ios] = d_code_fin_chaine; pointeur += ios; - nombre_iterations++; if ((tampon = realloc(tampon, - ((size_t) ((nombre_iterations * longueur_lecture) + 1)) + ((size_t) ((longueur_lue + longueur_lecture) + 1)) * sizeof(unsigned char))) == NULL) { (*s_etat_processus).erreur_systeme =