aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/epp.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-02-20 13:01:32 +0100
committerHans Bolinder <[email protected]>2014-02-20 13:04:20 +0100
commitb3bee03e513c5a3d777c6df360a2f421ba1cc610 (patch)
tree76de8a6715db4eb94a3e93bc9983e5732cd9c851 /lib/stdlib/src/epp.erl
parenta1631b173c977b5903e26a2bed36f9b32fe5b4d5 (diff)
downloadotp-b3bee03e513c5a3d777c6df360a2f421ba1cc610.tar.gz
otp-b3bee03e513c5a3d777c6df360a2f421ba1cc610.tar.bz2
otp-b3bee03e513c5a3d777c6df360a2f421ba1cc610.zip
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.
Diffstat (limited to 'lib/stdlib/src/epp.erl')
-rw-r--r--lib/stdlib/src/epp.erl4
1 files changed, 2 insertions, 2 deletions
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 ->