diff options
author | Chad Elliott <elliott_c@ociweb.com> | 2020-01-06 10:24:54 -0600 |
---|---|---|
committer | Chad Elliott <elliott_c@ociweb.com> | 2020-01-06 10:24:54 -0600 |
commit | b26af7b33d8e315b816419e1cf9ea62734130300 (patch) | |
tree | 1002d3b90ff2679b3481bbb92689839f38c20a14 | |
parent | 5d680f21e8fa8e65381e633fbb43e85909c72c79 (diff) | |
download | MPC-b26af7b33d8e315b816419e1cf9ea62734130300.tar.gz |
Mon Jan 6 06:21:29 UTC 2020 Chad Elliott <elliottc@objectcomputing.com>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 7 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,11 @@ +Mon Jan 6 06:21:29 UTC 2020 Chad Elliott <elliottc@objectcomputing.com> + + * modules/ProjectCreator.pm: + + Make a copy of the flag override hash when connecting it to a + file so that we do not inadvertantly modify multiple flag overrides + when modifying flag overrides for a single file. + Mon Jul 1 18:35:43 UTC 2019 Chad Elliott <elliottc@objectcomputing.com> * modules/TemplateParser.pm: diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 256740e8..460972cf 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -1429,7 +1429,12 @@ sub process_component_line { my $over = $self->{'flag_overrides'}->{$tag}; if (defined $over) { foreach my $file (@files) { - $$over{$file} = $flags; + ## We are giving these flag overrides to multiple files. Since + ## $flags is a hash reference, we need to make a copy so that + ## modifying one of these files flag overrides doesn't modify + ## all of them. + my %copy = %$flags; + $$over{$file} = \%copy; } } |