Don't access the first character of a possible empty USEMAP parameter.
This fixes an assert when using debug CRT in VC9. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -651,7 +651,7 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
|
|||||||
if (tag.HasParam(wxT("USEMAP")))
|
if (tag.HasParam(wxT("USEMAP")))
|
||||||
{
|
{
|
||||||
mn = tag.GetParam( wxT("USEMAP") );
|
mn = tag.GetParam( wxT("USEMAP") );
|
||||||
if (mn.GetChar(0) == wxT('#'))
|
if ( !mn.empty() && *mn.begin() == '#' )
|
||||||
{
|
{
|
||||||
mn = mn.Mid( 1 );
|
mn = mn.Mid( 1 );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user