Fix #357: Enabling "fixes" on map dialog crashes FG
This happened for fixes with names shorter than 5 characters. range check added, which operator[] does not perform.
This commit is contained in:
parent
0d900923b2
commit
279fbdc837
1 changed files with 1 additions and 1 deletions
|
@ -917,7 +917,7 @@ public:
|
||||||
virtual bool pass(FGPositioned* aPos) const {
|
virtual bool pass(FGPositioned* aPos) const {
|
||||||
if (_fixes && (aPos->type() == FGPositioned::FIX)) {
|
if (_fixes && (aPos->type() == FGPositioned::FIX)) {
|
||||||
// ignore fixes which end in digits - expirmental
|
// ignore fixes which end in digits - expirmental
|
||||||
if (isdigit(aPos->ident()[3]) && isdigit(aPos->ident()[4])) {
|
if (aPos->ident().length() > 4 && isdigit(aPos->ident()[3]) && isdigit(aPos->ident()[4])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue