From 457d52924152c6f2baf2fddbe76a03bca7bdde7c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 24 Jul 2013 18:13:25 +0200 Subject: tools: fix js2c macro expansion bug If the same macro was used twice in close proximity, the second one didn't get expanded. --- tools/js2c.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/js2c.py') diff --git a/tools/js2c.py b/tools/js2c.py index 772a0f5f69..bbbccb289a 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -150,9 +150,10 @@ def ExpandMacros(lines, macros): result = macro.expand(mapping) # Replace the occurrence of the macro with the expansion lines = lines[:start] + result + lines[end:] - start = lines.find(name + '(', end) + start = lines.find(name + '(', start) return lines + class TextMacro: def __init__(self, args, body): self.args = args -- cgit v1.2.3