From 8c583648ba74299a081afe87129d521d1cb5ac3d Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 29 Apr 2001 01:53:09 +0000 Subject: Pouet --- lib/polynom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3