Skip to content

Commit

Permalink
remove nan values from digiline messages
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed Mar 12, 2024
1 parent 60f80a1 commit a72aa33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,10 @@ local function clean_and_weigh_digiline_message(msg, back_references)
return msg, #msg + 25
elseif t == "number" then
-- 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
elseif t == "boolean" then
-- Booleans are passed by value so need not be touched, and cost 1
Expand Down

0 comments on commit a72aa33

Please sign in to comment.