From c9b8616c515f7689baf0706a9c17d3f9d625ef04 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Wed, 11 Feb 2015 10:23:23 -0500 Subject: base: Do not dereference NULL in CompoundFlag creation This patch fixes the CompoundFlag constructor, ensuring that it does not dereference NULL. Doing so has undefined behaviuor, and both clang and gcc's undefined-behaviour sanitiser was rather unhappy. --- src/SConscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/SConscript') diff --git a/src/SConscript b/src/SConscript index f85ed7a62..cffc4d157 100755 --- a/src/SConscript +++ b/src/SConscript @@ -852,9 +852,9 @@ namespace Debug { last = len(compound) - 1 for i,flag in enumerate(compound): if i != last: - comp_code('$flag,') + comp_code('&$flag,') else: - comp_code('$flag);') + comp_code('&$flag);') comp_code.dedent() code.append(comp_code) -- cgit v1.2.3