--- rpl/src/instructions_a1.c 2013/02/27 17:11:41 1.42 +++ rpl/src/instructions_a1.c 2013/03/16 11:31:41 1.43 @@ -865,14 +865,28 @@ instruction_abs(struct_processus *s_etat if ((*s_objet_argument).type == INT) { - if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL) + if ((*((integer8 *) (*s_objet_argument).objet)) != INT64_MIN) { - (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; - return; + if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } + + (*((integer8 *) (*s_objet_resultat).objet)) = abs((*((integer8 *) + (*s_objet_argument).objet))); } + else + { + if ((s_objet_resultat = allocation(s_etat_processus, REL)) == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } - (*((integer8 *) (*s_objet_resultat).objet)) = abs((*((integer8 *) - (*s_objet_argument).objet))); + (*((real8 *) (*s_objet_resultat).objet)) = abs((real8) + ((*((integer8 *) (*s_objet_argument).objet)))); + } } /*