--- rpl/src/formateur_fichiers.c 2012/04/03 13:38:26 1.40 +++ rpl/src/formateur_fichiers.c 2013/02/27 17:11:40 1.50 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.7 - Copyright (C) 1989-2012 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.13 + Copyright (C) 1989-2013 Dr. BERTRAND Joël This file is part of RPL/2. @@ -1496,8 +1496,19 @@ formateur_fichier(struct_processus *s_et return(NULL); } - position_3 = strlen(format_chaine); - format_chaine[--position_3] = d_code_fin_chaine; + position_3 = strlen(format_chaine) - 1; + + if (format_chaine[position_3] != ')') + { + free(chaine); + free(format_chaine); + + (*s_etat_processus).erreur_execution = + d_ex_erreur_format_fichier; + return(NULL); + } + + format_chaine[position_3] = d_code_fin_chaine; position_2 = position_1;