From d5892339a109b7d4ad71f884203fe0c2e81e841c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 18 Dec 2009 14:47:25 +0000 Subject: [PATCH] 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 --- src/html/m_image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index 43904eac78..1bedf04ec0 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -651,7 +651,7 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA") if (tag.HasParam(wxT("USEMAP"))) { mn = tag.GetParam( wxT("USEMAP") ); - if (mn.GetChar(0) == wxT('#')) + if ( !mn.empty() && *mn.begin() == '#' ) { mn = mn.Mid( 1 ); } -- 2.47.2