mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-07-29 16:29:17 +02:00
fix pcalls
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ local function get_data()
|
||||
local oda = _RDS_ODAs[_RDS_ODA_pointer]
|
||||
|
||||
if oda ~= false and type(oda.handler) == "function" then
|
||||
local ok, generated, b, c, d = pcall(oda.handler())
|
||||
local ok, generated, b, c, d = pcall(oda.handler)
|
||||
if ok and generated then
|
||||
_RDS_ODA_pointer = (_RDS_ODA_pointer % #_RDS_ODAs) + 1
|
||||
b = b | oda.group << 12
|
||||
|
||||
@@ -100,7 +100,7 @@ function rds2_group(stream)
|
||||
local generated = false
|
||||
checked = 0
|
||||
while generated == false and checked < #_RDS2_ODAs do
|
||||
local ok, generated, a, b, c, d = pcall(oda.handler(stream))
|
||||
local ok, generated, a, b, c, d = pcall(oda.handler, stream)
|
||||
if not (generated and ok) then
|
||||
_RDS2_ODA_pointer = _RDS2_ODA_pointer + 1
|
||||
if _RDS2_ODA_pointer > #_RDS2_ODAs then _RDS2_ODA_pointer = 1 end
|
||||
|
||||
Reference in New Issue
Block a user