wxRegConfig now works again

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-09-07 08:55:28 +00:00
parent fd2daa68f4
commit 040f0110fc
2 changed files with 61 additions and 56 deletions

View File

@@ -887,11 +887,14 @@ bool GetFileTypeIcon(wxIcon *pIcon, const wxString& strFileType)
// NB: icon index may be negative as well as positive and the full path
// may contain the environment variables inside '%'
wxString strFullPath = strIcon.Before(','),
strIndex = strIcon.After(',');
strIndex = strIcon.Right(',');
// unless I misunderstand the format (may be index may be ommited, I
// don't know)
wxASSERT( !(strFullPath.IsEmpty() || strIndex.IsEmpty()) );
// index may be omitted, in which case Before(',') is empty and
// Right(',') is the whole string
if ( strFullPath.IsEmpty() ) {
strFullPath = strIndex;
strIndex = "0";
}
wxString strExpPath = wxExpandEnvVars(strFullPath);
int nIndex = atoi(strIndex);