mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2025-05-21 06:11:02 +00:00
fix an off-by-one error that predates me
This commit is contained in:
parent
4c2eedb155
commit
aa32fa15d9
|
@ -68,7 +68,7 @@ function TscFile:_stringReplace(text, needle, replacement, label, overrides)
|
||||||
assert((i % 1 == 0) and (i > 0) and (i <= j), tostring(i))
|
assert((i % 1 == 0) and (i > 0) and (i <= j), tostring(i))
|
||||||
assert((j % 1 == 0), tostring(j))
|
assert((j % 1 == 0), tostring(j))
|
||||||
local a = text:sub(1, i - 1)
|
local a = text:sub(1, i - 1)
|
||||||
local b = text:sub(j + 1)
|
local b = text:sub(j)
|
||||||
return a .. replacement .. b, nil
|
return a .. replacement .. b, nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue