avoid wxColour::Set(long) confusion

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2006-05-18 03:27:51 +00:00
parent a01ed326cc
commit 044077236a

View File

@ -54,10 +54,12 @@ bool wxColourBase::FromString(const wxChar *str)
{
// hexadecimal prefixed with # (HTML syntax)
unsigned long tmp;
if (wxSscanf(&str[1], wxT("%lX"), &tmp) != 1)
if (wxSscanf(&str[1], wxT("%lx"), &tmp) != 1)
return false;
Set(tmp); // set from packed long
Set((unsigned char)(tmp >> 16),
(unsigned char)(tmp >> 8),
(unsigned char)tmp);
}
else if (wxTheColourDatabase) // a colour name ?
{