You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the flagFN() function iterates through os.Args,
the first v value is "abs", which causes the flag "s" to be misinterpreted.
diff --git evaluator/functions.go evaluator/functions.go
index 5d3d7c0..52999a7 100644
--- evaluator/functions.go+++ evaluator/functions.go@@ -615,7 +615,7 @@ func flagFn(tok token.Token, env *object.Environment, args ...object.Object) obj
// passed to the script
// This is O(n) but again, performance
// is not a big deal in ABS
- for _, v := range os.Args {+ for _, v := range os.Args[1:] {
// If the flag was found in the previous
// argument...
if found {
The text was updated successfully, but these errors were encountered:
When the
flagFN()
function iterates throughos.Args
,the first
v
value is "abs
", which causes the flag "s
" to be misinterpreted.The text was updated successfully, but these errors were encountered: