Fix invalid argument enumeration when there are >=3 arguments

This bug had no impact since currently no macro has more than 2 arguments.

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2022-04-15 16:15:48 +02:00
parent c77f16b356
commit d36ed48f19
+1 -1
View File
@@ -185,7 +185,7 @@ class PSAMacroEnumerator:
for value in argument_lists[i][1:]:
arguments[i] = value
yield self._format_arguments(name, arguments)
arguments[i] = argument_lists[0][0]
arguments[i] = argument_lists[i][0]
except BaseException as e:
raise Exception('distribute_arguments({})'.format(name)) from e