summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--modules/ProjectCreator.pm7
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4348d0e7..405182dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}
}