From fc934520a5646910023ffa9925fe6516905a5228 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 2 Feb 2020 18:54:14 +0100 Subject: [PATCH] Fixed crash within the command parser --- src/query/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/Command.cpp b/src/query/Command.cpp index ee58cb7..7b14cde 100644 --- a/src/query/Command.cpp +++ b/src/query/Command.cpp @@ -99,7 +99,7 @@ namespace ts { while(++current_index > 0 || (current_index == 0 && !expect_type && (expect_type = true))) { end_index = data.find_first_of(" |", current_index); - if(end_index != current_index) { /* else we've found another space or a pipe */ + if(end_index != current_index && current_index < data.length()) { /* else we've found another space or a pipe */ if(data[current_index] == '-') { string trigger(data.substr(current_index + 1, end_index - current_index - 1)); result.paramethers.push_back(trigger);