adding a little fix on position parsing

This commit is contained in:
Clément Le Bihan
2021-06-19 00:54:47 +02:00
parent 1093e2d910
commit 96fe7be3da
+1 -1
View File
@@ -283,7 +283,7 @@ namespace BBM {
try {
auto start = line.find('[') + 1;
auto end = line.find(']');
if (start == std::string::npos || end == std::string::npos || line.back() != ']') {
if (line.front() != '[' || end == std::string::npos || line.back() != ']') {
throw ParserError("Error parsing position.");
}
subStr = line.substr(start, end - start);