Skip to content

Commit

Permalink
Tuesday 2024-11-26 22:18:55
Browse files Browse the repository at this point in the history
  • Loading branch information
jackokring committed Nov 26, 2024
1 parent 9733ed3 commit 98e377a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/doris/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,11 @@ end
---to number with default C numeric locale
---@param str string
---@param base? integer
---@return number?
---@return number
_G.val = function(str, base)
local l = os.setlocale()
os.setlocale("C", "numeric")
local s = tonumber(str, base or 10)
local s = tonumber(str, base or 10) or 0
os.setlocale(l, "numeric")
return s
end
Expand Down

0 comments on commit 98e377a

Please sign in to comment.