Enabled @include to use variables.

Fixed the issue that the window becomes invalid when both window width and height are 0.
This commit is contained in:
spx
2010-05-27 22:03:09 +00:00
parent 3640c60810
commit 56f1c6a38d
2 changed files with 32 additions and 15 deletions

View File

@@ -934,6 +934,7 @@ void CConfigParser::ReadIniFile(const std::wstring& iniFile, int depth)
if (wcsnicmp(strKey.c_str(), L"@include", 8) == 0)
{
std::wstring strIncludeFile = buffer;
ReadVariables();
ReplaceVariables(strIncludeFile);
if (strIncludeFile.find(L':') == std::wstring::npos &&
(strIncludeFile.length() < 2 || (strIncludeFile[0] != L'\\' && strIncludeFile[0] != L'/') || (strIncludeFile[1] != L'\\' && strIncludeFile[1] != L'/')))