vlc/lua-math.patch
Yaakov Selkowitz 9ff5b8688c Fix lua web interface
math.pow was deprecated in lua-5.3 in favour of the ^ operator:
https://www.lua.org/manual/5.3/manual.html#8.2

Resolves: rhbz#2280091
2024-06-02 23:40:01 -04:00

11 lines
457 B
Diff

--- ./share/lua/intf/modules/httprequests.lua.Orig 2023-08-05 06:03:51.000000000 -0400
+++ ./share/lua/intf/modules/httprequests.lua 2024-05-28 14:02:41.569002601 -0400
@@ -34,7 +34,7 @@
what = common.us_tonumber(what)
end
if type(what) == "number" then
- return math.floor(what*math.pow(10,precision)+0.5) / math.pow(10,precision)
+ return math.floor(what*(10^precision)+0.5) / (10^precision)
end
return nil
end