Skip to content

Commit 447980d

Browse files
authored
Merge pull request #603 from wpferguson/fix_stringlib_sequence_arguments
Fix sequence string substitution variable to accept starting number > 9
2 parents c95547c + 8af5476 commit 447980d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/dtutils/string.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ local function treat(var_string)
10111011
log.msg(log.info, "ret_val is " .. ret_val)
10121012

10131013
elseif string.match(var_string, "SEQUENCE%[") then
1014-
local width, start = string.match(var_string, "(%d+),(%d)")
1014+
local width, start = string.match(var_string, "(%d+),(%d+)")
10151015
local seq_val = tonumber(substitutes[var])
10161016
local pat = "%0" .. width .. "d"
10171017
substitutes[var_string] = string.format(pat, start + (seq_val - 1))

0 commit comments

Comments
 (0)