From 0707dc2fb1a4f19ceacd4b868f1ef5722e88c316 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 24 Feb 2020 13:33:19 +0100 Subject: [PATCH] Fix if download or upload are empty --- luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index da0a63b2b..98b664e50 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -256,7 +256,7 @@ function wizard_add() ucic:set("sqm",intf,"upload","0") end - if downloadspeed ~= "0" and uploadspeed ~= "0" then + if downloadspeed ~= "0" and uploadspeed ~= "0" and downloadspeed ~= "" and uploadspeed ~= "" then ucic:set("network",intf,"downloadspeed",downloadspeed) ucic:set("network",intf,"uploadspeed",uploadspeed) ucic:set("sqm",intf,"download",math.ceil(downloadspeed*95/100))