Skip to content

Commit

Permalink
misc: try to fix segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni500github committed Sep 24, 2024
1 parent 3b75a18 commit eaf007b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ std::string parse(const std::string_view input, systemInfo_t& systemInfo, std::s
}

// maybe let's remove the bypass '\\$'
if (output[dollarSignIndex - 1] == '\\' and output[dollarSignIndex - 2] == '\\')
if (dollarSignIndex > 0 and
output[dollarSignIndex - 1] == '\\' and output[dollarSignIndex - 2] == '\\')
{
skip_bypass = true;
output.erase(dollarSignIndex - 1, 1);
Expand Down

0 comments on commit eaf007b

Please sign in to comment.