Repair a minor defect in callsign input validation

This commit is contained in:
Bill Somerville 2021-06-09 13:12:25 +01:00
parent 6a2526f984
commit 05d8aa5022
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -14,7 +14,7 @@ auto CallsignValidator::validate (QString& input, int& pos) const -> State
input.remove (0, 1); input.remove (0, 1);
if (pos > 0) --pos; if (pos > 0) --pos;
} }
while (input.size () && input[input.size ()].isSpace ()) while (input.size () && input[input.size () - 1].isSpace ())
{ {
if (pos > input.size ()) --pos; if (pos > input.size ()) --pos;
input.chop (1); input.chop (1);