From 56eda3d8af9317005a92a8d138356eb2a6d970f1 Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Fri, 22 Jul 2016 08:36:36 +0000 Subject: [PATCH] core/app.lua: Fix end_breath timeline event arg Requires a math.max() on an argument that is otherwise FFI cdata. --- src/core/app.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/app.lua b/src/core/app.lua index cb71975784..18ee647495 100644 --- a/src/core/app.lua +++ b/src/core/app.lua @@ -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