File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -225,16 +225,16 @@ const expandFunctionMacro = (
225225
226226 // Replace the use of the macro with the expansion
227227 const processed = current . replace (
228- current . substr ( startMatch . index , matchLength ) ,
228+ current . substring ( startMatch . index , startMatch . index + matchLength ) ,
229229 expandedReplace
230230 ) ;
231231 // Add text up to the end of the expanded macro to what we've procssed
232- expanded += processed . substr ( 0 , endOfReplace ) ;
232+ expanded += processed . substring ( 0 , endOfReplace ) ;
233233
234234 // Only work on the rest of the text, not what we already expanded. This is
235235 // to avoid a nested macro #define foo() foo() where we'll try to expand foo
236236 // forever. With this strategy, we expand foo() to foo() and move on
237- current = processed . substr ( endOfReplace ) ;
237+ current = processed . substring ( endOfReplace ) ;
238238 }
239239
240240 return expanded + current ;
You can’t perform that action at this time.
0 commit comments