From 391e0a12d2593ab45a8a0ab56daab8858f922f1d Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Wed, 12 Feb 2014 12:46:24 +0100 Subject: [PATCH] polinoml - poliNaN memorija --- kodovi/polinomi/POLINOML.MOD | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kodovi/polinomi/POLINOML.MOD b/kodovi/polinomi/POLINOML.MOD index 1f53f28..74af962 100644 --- a/kodovi/polinomi/POLINOML.MOD +++ b/kodovi/polinomi/POLINOML.MOD @@ -327,18 +327,19 @@ PROCEDURE PolinomNaN(p: Polinom; n: CARDINAL; VAR rez: Polinom); VAR i: CARDINAL; + pret : Polinom; BEGIN IF n = 0 THEN NEW(rez); rez^.k := 1.0; rez^.st := 0; rez^.veza := NIL; - ELSIF n = 1 THEN - Kopiraj( p, rez ); ELSE - rez := p; + Kopiraj( p, rez ); FOR i := 2 TO n DO - Puta(rez, p, rez) + pret := rez; + Puta(pret, p, rez); + DisposePolinom(pret); END END; END PolinomNaN; -- 2.25.1