Address down-casting warnings

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman
2020-02-28 10:39:18 +01:00
parent c64632b85f
commit ee8591f6eb
2 changed files with 10 additions and 5 deletions

View File

@@ -89,7 +89,8 @@ bool wxHostNameValidator::Parse(const wxString &val_in, size_t i_start, size_t i
} else {
// Invalid character found.
ctrl->SetFocus();
ctrl->SetSelection(i, i + 1);
if (i + 1 <= 0x7fffffff)
ctrl->SetSelection((long)i, (long)(i + 1));
wxMessageBox(wxString::Format(_("Invalid character in host name found: %c"), buf[i]), _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return false;
}