openwrt: nan should be string encoded

This commit is contained in:
Bart Van Der Meerssche 2010-10-03 21:12:01 +02:00
parent f8a732c88b
commit 332d3ef4e1
1 changed files with 2 additions and 2 deletions

View File

@ -80,10 +80,10 @@ function fill(M)
for meter, T in pairs(M) do
local H = timestamps(T)
for i = H[#H]-1, H[1]+1, -1 do
if T[i] == nil or T[i] == 'nan' then T[i] = T[i+1] end
if T[i] == nil or T[i] == '"nan"' then T[i] = T[i+1] end
end
for i = H[#H]+1, os.time() do
T[i] = 'nan'
T[i] = '"nan"'
end
end
end