--- rpl/src/instructions_c3.c 2011/04/14 08:46:40 1.19.2.2 +++ rpl/src/instructions_c3.c 2011/11/17 17:20:29 1.32 @@ -1,6 +1,6 @@ /* ================================================================================ - RPL/2 (R) version 4.0.23 + RPL/2 (R) version 4.1.4 Copyright (C) 1989-2011 Dr. BERTRAND Joël This file is part of RPL/2. @@ -674,10 +674,22 @@ instruction_chr(struct_processus *s_etat } else { - liberation(s_etat_processus, s_objet_argument); + if ((s_objet_resultat = allocation(s_etat_processus, CHN)) == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } - (*s_etat_processus).erreur_execution = d_ex_argument_invalide; - return; + if (((*s_objet_resultat).objet = malloc(5 * sizeof(unsigned char))) + == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } + + sprintf((unsigned char *) (*s_objet_resultat).objet, "\\x%02X", + (unsigned char) (*((integer8 *) + (*s_objet_argument).objet))); } }