--- rpl/src/formateur_fichiers.c 2012/01/05 10:18:59 1.37 +++ rpl/src/formateur_fichiers.c 2013/02/26 19:56:12 1.49 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.5 - Copyright (C) 1989-2012 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.12 + 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; @@ -6193,3 +6204,5 @@ formateur_fichier_binaire_nombre(struct_ return(chaine); } + +// vim: ts=4