From b3bee03e513c5a3d777c6df360a2f421ba1cc610 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 20 Feb 2014 13:01:32 +0100 Subject: Fix a bug in epp concerning circular macro definitions epp could loop when encountering a circular macro definition in an included file. Thanks to Maruthavanan Subbarayan for reporting the bug, and to Richard Carlsson for providing a bug fix. --- lib/stdlib/src/epp.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stdlib/src/epp.erl') diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl index 4fd302e612..dc25b6b9f4 100644 --- a/lib/stdlib/src/epp.erl +++ b/lib/stdlib/src/epp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -640,7 +640,7 @@ leave_file(From, St) -> Ms = dict:store({atom,'FILE'}, {none,[{string,CurrLoc,OldName2}]}, St#epp.macs), - NextSt = OldSt#epp{sstk=Sts,macs=Ms}, + NextSt = OldSt#epp{sstk=Sts,macs=Ms,uses=St#epp.uses}, enter_file_reply(From, OldName, CurrLoc, CurrLoc), case OldName2 =:= OldName of true -> -- cgit v1.2.3