Skip to content

Commit

Permalink
Incorrect parameterized goal argument interpolation when @define goes…
Browse files Browse the repository at this point in the history
… after #152
  • Loading branch information
xonixx committed Dec 24, 2023
1 parent a1cca0a commit 6a45695
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ BEGIN {
makesure()
}

function makesure( i,j) {
function makesure( i) {
while (getline > 0) { # 1st pass - defines
Lines[NR] = $0
if ("@define" == $1 && reparseCli() >= 0) handleDefine()
for (j = 1; j < 10; j++) $j = "" # only for macos 10.15 awk version 20070501
_reset()
}
Mode = "prelude"
for (i = 1; i in Lines; i++) { # 2nd pass - all the rest
Expand All @@ -62,11 +62,14 @@ function makesure( i,j) {
else if ("@use_lib" == $1) handleUseLib()
else if ($1 ~ /^@/) addError("Unknown directive: " $1)
else handleCodeLine($0)
for (j = 1; j < 10; j++) $j = "" # only for macos 10.15 awk version 20070501
_reset()
}
doWork()
realExit(0)
}
function _reset( j) {
for (j = 1; j < 10; j++) $j = "" # only for macos 10.15 awk version 20070501
}

function prepareArgs( i,arg) {
for (i = 2; i < ARGC; i++) {
Expand Down

0 comments on commit 6a45695

Please sign in to comment.