From 0d15f8ab1293a611831840df75ea40eee41b86a2 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 1 Dec 2009 22:52:11 +0100 Subject: epp: fix bug in the function scan_undef The dict St#epp.uses that helps to find circular macros was not correctly updated. --- lib/stdlib/src/epp.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/stdlib/src/epp.erl') diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl index 8b702c005b..02cfd5a378 100644 --- a/lib/stdlib/src/epp.erl +++ b/lib/stdlib/src/epp.erl @@ -576,11 +576,11 @@ add_macro_uses([{Key, Def} | Rest], D0) -> %% scan_undef(Tokens, UndefToken, From, EppState) scan_undef([{'(',_Llp},{atom,_Lm,M},{')',_Lrp},{dot,_Ld}], _Undef, From, St) -> - scan_toks(From, St#epp{macs=dict:erase({atom,M}, St#epp.macs), - uses=all_macro_uses(St#epp.macs)}); + Macs = dict:erase({atom,M}, St#epp.macs) + scan_toks(From, St#epp{macs=Macs, uses=all_macro_uses(Macs)}); scan_undef([{'(',_Llp},{var,_Lm,M},{')',_Lrp},{dot,_Ld}], _Undef, From,St) -> - scan_toks(From, St#epp{macs=dict:erase({atom,M}, St#epp.macs), - uses=all_macro_uses(St#epp.macs)}); + Macs = dict:erase({atom,M}, St#epp.macs), + scan_toks(From, St#epp{macs=Macs, uses=all_macro_uses(Macs)}); scan_undef(_Toks, Undef, From, St) -> epp_reply(From, {error,{loc(Undef),epp,{bad,undef}}}), wait_req_scan(St). -- cgit v1.2.3