From: Ryan Norton Date: Mon, 18 Apr 2005 21:24:03 +0000 (+0000) Subject: use atoi instead of sscanf X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d161e2f39acd107a70735f2b76f42f8e4aadef84 use atoi instead of sscanf git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 4383f3cde2..a9d30e2bef 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -160,10 +160,7 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) if ( current[0U] == 'f' && wxIsdigit(current[1U]) && (current.Len() == 2 || (current.Len() == 3 && wxIsdigit(current[2U]))) ) { - int n; - wxSscanf(current.c_str() + 1, wxT("%d"), &n); - - keyCode = WXK_F1 + n - 1; + keyCode = WXK_F1 + wxAtoi(current.c_str() + 1) - 1; } else { // several special cases