Format: fixes substring ends before the start of the string (#2669)

* Format: fix substring ends before the start of the string

Closes #2668

Signed-off-by: Don Yin <Don_Yin@outlook.com>

* Doc: moves changelog entry to Unreleased [ci skip]

I moved the unreleased fix out of the 2.70.0 section.

Signed-off-by: Don Yin <Don_Yin@outlook.com>

---------

Signed-off-by: Don Yin <Don_Yin@outlook.com>
This commit is contained in:
Don Yin
2026-10-26 05:34:50 +00:00
committed by GitHub
parent 197d1c6e5d
commit ad62e3d1f5
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -96,6 +96,7 @@ int main(void) {
VERIFY("output({1~10,10})", "12345 67890", "output()");
VERIFY("output({1~10,5})", "12345 67890", "output()");
VERIFY("output({1~3,-3})", "12345 67890", "output(45 67)");
VERIFY("output({1~0,-12})", "12345 67890", "output()");
VERIFY("output({1~-5,-3})", "12345 67890", "output(67)");
VERIFY("output({1~-0,10})", "12345 67890", "output(12345 6789)");
VERIFY("output({1~-3,-5})", "12345 67890", "output()");