From 1f2b72e2ca01b540054d5b245bf7d07870d42baf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 6 Jan 2017 13:07:22 +0100 Subject: mod_register: Strip '+' char from field names without using length --- plugins/mod_register.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index f89efe20..7a57d65b 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -64,7 +64,7 @@ for _, field in ipairs(additional_fields) do registration_form[#registration_form + 1] = field; else if field:match("%+$") then - field = field:sub(1, #field - 1); + field = field:sub(1, -2); field_map[field].required = true; end -- cgit v1.2.3