-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Severity: Medium
Area: Standard library — lib/lua/vm/stdlib/string.ex
Description
string.format raises "bad argument to 'string.format' (invalid option '%.')" when given format specifiers with precision (e.g., %.2f) or width-and-precision combinations. Standard Lua 5.3/5.4 supports the full C printf-style format string syntax.
Reproduction
return string.format("%.2f", 3.14159)
-- Expected: "3.14"
-- Actual: ** (Lua.RuntimeException) bad argument to 'string.format' (invalid option '%.')Workaround
Use %f (full float) or convert manually with math.floor / string concatenation.
Summary Table
| # | Bug | Severity | Status |
|---|---|---|---|
| 1 | local function declarations silently dropped |
High | Open |
| 2 | function Table.method() dot-syntax fails at runtime |
High | Open |
| 3 | Multiple for loops with the same variable name corrupt register allocation |
High | Open |
| 4 | Register overlap in nested functions causes infinite for loops |
Critical | Fixed |
| 5 | string.format does not support precision specifiers |
Medium | Open |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working