--- rpl/src/instructions_u1.c 2010/03/04 10:17:53 1.4 +++ rpl/src/instructions_u1.c 2010/03/04 17:42:46 1.5 @@ -782,17 +782,35 @@ instruction_use(struct_processus *s_etat { free(tampon); - if ((tampon = malloc((strlen((unsigned char *) - (*s_objet_argument).objet) + strlen(d_exec_path) + 7) - * sizeof(unsigned char))) == NULL) + if ((*s_etat_processus).rpl_home == NULL) { - (*s_etat_processus).erreur_systeme = - d_es_allocation_memoire; - return; + if ((tampon = malloc((strlen((unsigned char *) + (*s_objet_argument).objet) + strlen(d_exec_path) + + 7) * sizeof(unsigned char))) == NULL) + { + (*s_etat_processus).erreur_systeme = + d_es_allocation_memoire; + return; + } + + sprintf(tampon, "/%s/lib/%s", d_exec_path, (unsigned char *) + (*s_objet_argument).objet); } + else + { + if ((tampon = malloc((strlen((unsigned char *) + (*s_objet_argument).objet) + + strlen((*s_etat_processus).rpl_home) + + 7) * sizeof(unsigned char))) == NULL) + { + (*s_etat_processus).erreur_systeme = + d_es_allocation_memoire; + return; + } - sprintf(tampon, "/%s/lib/%s", d_exec_path, (unsigned char *) - (*s_objet_argument).objet); + sprintf(tampon, "/%s/lib/%s", (*s_etat_processus).rpl_home, + (unsigned char *) (*s_objet_argument).objet); + } caracteristiques_fichier(s_etat_processus, tampon, &existence, &ouverture, &unite);