mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-18 10:26:15 +01:00
Coord: do not accept invalid strings starting with valid coordinates
This commit is contained in:
parent
536da10a97
commit
bedcc561f3
1 changed files with 3 additions and 0 deletions
|
@ -100,6 +100,9 @@ void Coord::setFromString(const wstring &iWStr)
|
|||
int row = toupper(*l) - 'A' + 1;
|
||||
setCol(col);
|
||||
setRow(row);
|
||||
// Input such as "A12foo#bar&stuff" should be invalid
|
||||
if (isValid() && toString() != iWStr)
|
||||
setCol(-1);
|
||||
}
|
||||
|
||||
wstring Coord::toString(coord_mode_t mode) const
|
||||
|
|
Loading…
Reference in a new issue