From bffae2605e62e461b1e0e2faf10389799f9eb74c Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Wed, 12 Feb 2014 12:50:45 +0100 Subject: [PATCH] polinoml - Puta, memorija --- kodovi/polinomi/POLINOML.MOD | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kodovi/polinomi/POLINOML.MOD b/kodovi/polinomi/POLINOML.MOD index 74af962..20e64ea 100644 --- a/kodovi/polinomi/POLINOML.MOD +++ b/kodovi/polinomi/POLINOML.MOD @@ -273,7 +273,7 @@ END MonomPuta; PROCEDURE Puta(p1, p2: Polinom; VAR pr: Polinom); VAR - pomocni: Polinom; + pomocni, brisi: Polinom; BEGIN Anuliraj(pr); IF (p1 <> NIL) AND (p2 <> NIL) THEN @@ -283,7 +283,9 @@ BEGIN MonomPuta(p1, p2, pomocni); REPEAT UbaciMonom(pomocni, pr); + brisi := pomocni; pomocni := pomocni^.veza + DISPOSE(brisi); UNTIL pomocni = NIL; p2 := p2^.veza END -- 2.25.1