mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-02-07 08:48:26 +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;
|
int row = toupper(*l) - 'A' + 1;
|
||||||
setCol(col);
|
setCol(col);
|
||||||
setRow(row);
|
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
|
wstring Coord::toString(coord_mode_t mode) const
|
||||||
|
|
Loading…
Add table
Reference in a new issue