mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-28 08:33:36 +00:00
adding a little fix on position parsing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user