There was an error while loading. Please reload this page.
2 parents 3ef3ff4 + da045bc commit 3315e2dCopy full SHA for 3315e2d
examples/prompt.cpp
@@ -12,7 +12,7 @@ using Term::Terminal;
12
bool determine_completeness([[maybe_unused]] std::string command) {
13
// Determine if the statement is complete
14
bool complete;
15
- if (command.substr(command.size() - 2, 1) == "\\") {
+ if (command.size() > 1 && command.substr(command.size() - 2, 1) == "\\") {
16
complete = false;
17
} else {
18
complete = true;
0 commit comments