Skip to content

Commit

Permalink
core/app.lua: Fix end_breath timeline event arg
Browse files Browse the repository at this point in the history
Requires a math.max() on an argument that is otherwise FFI cdata.
  • Loading branch information
lukego committed Jul 22, 2016
1 parent 8c461c8 commit 56eda3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ function breathe ()
local freed
local freed_packets = counter.read(frees) - freed_packets0
local freed_bytes = (counter.read(freebytes) - freed_bytes0)
local freed_bytes_per_packet = freed_bytes / math.max(freed_packets, 1)
local freed_bytes_per_packet = freed_bytes / math.max(tonumber(freed_packets), 1)
event_breath_end(counter.read(breaths), freed_packets, freed_bytes_per_packet)
counter.add(breaths)
-- Commit counters at a reasonable frequency
Expand Down

0 comments on commit 56eda3d

Please sign in to comment.