diff --git a/tools/js2c.py b/tools/js2c.py index 772a0f5f695586..bbbccb289ad67e 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -150,9 +150,10 @@ def add_arg(str): 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