From 8c792f9c6d128eb07564410a5e5a226b718bc014 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 12 Oct 2023 22:24:27 +0300 Subject: [PATCH] Shell: Fix parsing $ with unknown character --- userspace/Shell/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/userspace/Shell/main.cpp b/userspace/Shell/main.cpp index 2da632e1a7..7dd3f93965 100644 --- a/userspace/Shell/main.cpp +++ b/userspace/Shell/main.cpp @@ -156,7 +156,9 @@ BAN::Optional parse_dollar(BAN::StringView command, size_t& i) return output; } - return "$"sv; + BAN::String temp = "$"sv; + MUST(temp.push_back(command[i])); + return temp; } BAN::StringView strip_whitespace(BAN::StringView sv)