diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/polynom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/polynom.c b/lib/polynom.c index 35814bd..915f0d1 100644 --- a/lib/polynom.c +++ b/lib/polynom.c @@ -264,7 +264,7 @@ double ply_valuation(polynome poly, double point) char *ply_affichage(polynome poly) { /* routine d'affichage d'un polynome */ - char buf[BUFSIZ], temp[BUFSIZ]; /* FIXME: pas glop comme routine, malloquer tout ca ? */ + char buf[BUFSIZ] = {0}, temp[BUFSIZ]; /* FIXME: pas glop comme routine, malloquer tout ca ? */ while (poly) { if (poly->degre != 0) { @@ -273,6 +273,7 @@ char *ply_affichage(polynome poly) sprintf(temp, "%+f", rat_to_double(poly->coef)); } strcat(buf, temp); /* FIXME: gerer le depassement de buf si po malloc */ + poly = poly->suiv; } return Estrdup(buf); } |