use atoi instead of sscanf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -160,10 +160,7 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
|
|||||||
if ( current[0U] == 'f' && wxIsdigit(current[1U]) &&
|
if ( current[0U] == 'f' && wxIsdigit(current[1U]) &&
|
||||||
(current.Len() == 2 ||
|
(current.Len() == 2 ||
|
||||||
(current.Len() == 3 && wxIsdigit(current[2U]))) ) {
|
(current.Len() == 3 && wxIsdigit(current[2U]))) ) {
|
||||||
int n;
|
keyCode = WXK_F1 + wxAtoi(current.c_str() + 1) - 1;
|
||||||
wxSscanf(current.c_str() + 1, wxT("%d"), &n);
|
|
||||||
|
|
||||||
keyCode = WXK_F1 + n - 1;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// several special cases
|
// several special cases
|
||||||
|
Reference in New Issue
Block a user