From cedc661686dad6d82b0a96ea1490d36bc5ffee63 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Jun 2022 06:15:57 +0200 Subject: Tighten value::extra usage in config module Specifically, only values marked with 1 are treated as default leaving other values for use for other purposes. --- libbuild2/config/operation.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbuild2/config/operation.cxx') diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx index ed98f90..5edb610 100644 --- a/libbuild2/config/operation.cxx +++ b/libbuild2/config/operation.cxx @@ -509,8 +509,8 @@ namespace build2 // Handle the save_default_commented flag. // - if ((org.first.defined () && org.first->extra) && // Default value. - org.first == ovr.first && // Not overriden. + if (org.first.defined () && org.first->extra == 1 && // Default. + org.first == ovr.first && // No override. (flags & save_default_commented) != 0) { os << first () << '#' << n << " =" << endl; -- cgit v1.1