mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-28 08:37:28 +01:00
remove nan values from digiline messages
This commit is contained in:
parent
ce263da6d5
commit
8828183bef
@ -370,7 +370,10 @@ local function clean_and_weigh_digiline_message(msg, back_references)
|
|||||||
return msg, #msg + 25
|
return msg, #msg + 25
|
||||||
elseif t == "number" then
|
elseif t == "number" then
|
||||||
-- Numbers are passed by value so need not be touched, and cost 8 bytes
|
-- Numbers are passed by value so need not be touched, and cost 8 bytes
|
||||||
-- as all numbers in Lua are doubles.
|
-- as all numbers in Lua are doubles. NaN values are removed.
|
||||||
|
if msg ~= msg then
|
||||||
|
return nil, 0
|
||||||
|
end
|
||||||
return msg, 8
|
return msg, 8
|
||||||
elseif t == "boolean" then
|
elseif t == "boolean" then
|
||||||
-- Booleans are passed by value so need not be touched, and cost 1
|
-- Booleans are passed by value so need not be touched, and cost 1
|
||||||
|
Loading…
Reference in New Issue
Block a user