fengari-lua / fengari

🌙 φεγγάρι - The Lua VM written in JS ES6 for Node and the browser
MIT License
1.8k stars 64 forks source link

_, _, cap1 = '-':find('-') cap1 should return nil instead of empty string #185

Closed XuHaoJun closed 3 years ago

XuHaoJun commented 4 years ago
foo = "-"
_, _, cap1 = foo:find(foo)
print(cap1 == "")
print(cap1 == nil)
if cap1 then
  print("should never reach here!")
end

different result in fengari between native lua. in my usecase is -1 Dexterity per 1 Dexterity on Allocated Passives in Radius

mxdpeep commented 3 years ago

this repo is dead

daurnimator commented 3 years ago

this repo is dead

nope. no one has submitted a PR to fix this.

Bugs and/or changes to the code in this repo is rare, as Lua 5.3 is a fixed target.

daurnimator commented 3 years ago

Bugfix in https://github.com/fengari-lua/fengari/pull/195