diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-11-07 01:14:18 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-11-07 01:14:18 +0000 |
commit | 59a95675fd29873c7ef24ff2aba385230324afa1 (patch) | |
tree | 5932930e58691594c830a948147f5d40a09701b6 | |
parent | a375f945974e2d745f52e805539144bb3f041048 (diff) | |
download | acf-dhcp-59a95675fd29873c7ef24ff2aba385230324afa1.tar.bz2 acf-dhcp-59a95675fd29873c7ef24ff2aba385230324afa1.tar.xz |
Fix exception due to invalid replacement string
Fixes #6429
-rw-r--r-- | dhcp-model.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |