From 0e62dedb26971b618d06c39aea7f70c147203a83 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 15 Oct 2018 14:11:37 -0500 Subject: [PATCH] Correct misdetection of `[001]` as literal zero index The control flow in expand.cpp is a bit more complicated than it seemed at first blush. Ref #4862. --- src/expand.cpp | 1 + tests/zero_based_array.in | 5 +++++ tests/zero_based_array.out | 1 + 3 files changed, 7 insertions(+) diff --git a/src/expand.cpp b/src/expand.cpp index ed6532202..97ed27dc3 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -260,6 +260,7 @@ static size_t parse_slice(const wchar_t *in, wchar_t **end_ptr, std::vector