Bonjour,
Voici le code qui me pose problème.


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#define FONCTION "fiPrintErreur"
SHORT fiPrintErreur (	PCHAR	pchParametre,
			PCHAR 	pchLibelleErreur,
			int 	iCodeAlarme,
			LONG 	lIdJnTraitementAlarme,
			BOOL	bSansLog)
{
	USHORT		sValRet= XZC_NO_ERROR;
	XZT_PALARME	xztPalarme;
	PXZT_PALARME	pxztPalarme = &xztPalarme;
	char	        pchLigne[XZC_LGREP];
 
	TRACE (XZE_F,"Debut")
 
	sprintf(pchLigne,"Parametre : %s, Probleme : %s",pchParametre,pchLibelleErreur);
	SERROR("", pchLigne)
 
	if (bSansLog == XZC_FALSE)
	{
		fiPrintLog (iModuleADV,pchLigne);
 
	}
 
	memset(pxztPalarme,0, sizeof(XZT_PALARME));
	sprintf(pxztPalarme->xzpxztLibelle[0].chParam,pchParametre);
	/*STRACE(XZE_F2,"pchLibelleErreur_AVANT",pchLibelleErreur);*/
	sprintf(pxztPalarme->xzpxztLibelle[1].chParam,pchLibelleErreur);
	STRACE(XZE_F2,"pchLibelleErreur_APRES",pchLibelleErreur);
	STRACE(XZE_F2,"PXZT_VALEUR",pxztPalarme->xzpxztLibelle[1].chParam);
	scPrintAlarme (	iCodeAlarme,
			lIdJnTraitementAlarme,
			iModuleADV,
			pxztPalarme);
 
	DTRACE (XZE_F,"Fin",sValRet)
	return (sValRet) ;
}
#undef FONCTION

Le problème est le suivant :
Mon premier STRACE sur pchlibellValeur me donne

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
Le Seq1 Lettrage est incorrect : %%%%% a la ligne 3
Mon second STRACE sur pxztPalarme->xzpxztLibelle[1].chParam me donne :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
Le Seq1 Lettrage est incorrect : %% 0x1.5252525252525p-49 la lig
ne 3
Alor que j'ai fait juste avant

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
sprintf(pxztPalarme->xzpxztLibelle[1].chParam,pchLibelleErreur);
Je suis débutant en C, pouvez-vous m'aider à trouver d'où vient cette erreur
Merci d'avance