Fixed crash within the command parser
This commit is contained in:
parent
dd1fafeee9
commit
fc934520a5
@ -99,7 +99,7 @@ namespace ts {
|
|||||||
while(++current_index > 0 || (current_index == 0 && !expect_type && (expect_type = true))) {
|
while(++current_index > 0 || (current_index == 0 && !expect_type && (expect_type = true))) {
|
||||||
end_index = data.find_first_of(" |", current_index);
|
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] == '-') {
|
if(data[current_index] == '-') {
|
||||||
string trigger(data.substr(current_index + 1, end_index - current_index - 1));
|
string trigger(data.substr(current_index + 1, end_index - current_index - 1));
|
||||||
result.paramethers.push_back(trigger);
|
result.paramethers.push_back(trigger);
|
||||||
|
Loading…
Reference in New Issue
Block a user