From 59a95675fd29873c7ef24ff2aba385230324afa1 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 7 Nov 2016 01:14:18 +0000 Subject: Fix exception due to invalid replacement string Fixes #6429 --- dhcp-model.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhcp-model.lua b/dhcp-model.lua index 397cf1d..dcee745 100644 --- a/dhcp-model.lua +++ b/dhcp-model.lua @@ -25,7 +25,7 @@ end local replaceentry = function(file, configentry, newstring) if newstring then - return string.gsub(file, string.gsub(replacemagiccharacters(table.concat(configentry, "\n")), "\n", "%%s+"), replacemagiccharacters(newstring), 1) + return string.gsub(file, string.gsub(replacemagiccharacters(table.concat(configentry, "\n")), "\n", "%%s+"), newstring, 1) else return string.gsub(file, "[^\n%S]*"..string.gsub(replacemagiccharacters(table.concat(configentry, "\n")), "\n", "%%s+").."%s*;%s*\n?", "", 1) end -- cgit v1.2.3