lualoader: Fix parsing of negative number loader.conf(5) variables

They would previously cause errors, as the regex for these did not tolerate
a leading negative sign, and the variable would simply not parse.
This commit is contained in:
Kyle Evans 2018-08-13 14:49:07 +00:00
parent 5ccac9f972
commit 90486977de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337711

View File

@ -198,7 +198,7 @@ local pattern_table = {
},
-- env_var=num
{
str = "^%s*([%w%p]+)%s*=%s*(%d+)%s*(.*)",
str = "^%s*([%w%p]+)%s*=%s*(-?%d+)%s*(.*)",
process = function(k, v)
if setEnv(k, processEnvVar(v)) ~= 0 then
print(MSG_FAILSETENV:format(k, tostring(v)))