mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed: Rainmeter drops commands in !Execute series that are too long. (http://code.google.com/p/rainmeter/issues/detail?id=103)
This commit is contained in:
parent
9fcd6896de
commit
9b949a12e0
@ -458,7 +458,7 @@ void CConfigParser::ReadIniFile(const std::wstring& iniFile)
|
|||||||
items[0] = 0;
|
items[0] = 0;
|
||||||
int res = GetPrivateProfileString( NULL, NULL, NULL, items, size, iniFile.c_str());
|
int res = GetPrivateProfileString( NULL, NULL, NULL, items, size, iniFile.c_str());
|
||||||
if (res == 0) return; // File not found
|
if (res == 0) return; // File not found
|
||||||
if (res != size - 2) break; // Fits in the buffer
|
if (res < size - 2) break; // Fits in the buffer
|
||||||
|
|
||||||
delete [] items;
|
delete [] items;
|
||||||
size *= 2;
|
size *= 2;
|
||||||
@ -487,7 +487,7 @@ void CConfigParser::ReadIniFile(const std::wstring& iniFile)
|
|||||||
{
|
{
|
||||||
items[0] = 0;
|
items[0] = 0;
|
||||||
int res = GetPrivateProfileString((*iter).first.c_str(), NULL, NULL, items, size, iniFile.c_str());
|
int res = GetPrivateProfileString((*iter).first.c_str(), NULL, NULL, items, size, iniFile.c_str());
|
||||||
if (res != size - 2) break; // Fits in the buffer
|
if (res < size - 2) break; // Fits in the buffer
|
||||||
|
|
||||||
delete [] items;
|
delete [] items;
|
||||||
size *= 2;
|
size *= 2;
|
||||||
@ -503,11 +503,11 @@ void CConfigParser::ReadIniFile(const std::wstring& iniFile)
|
|||||||
{
|
{
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
int res = GetPrivateProfileString((*iter).first.c_str(), strKey.c_str(), L"", buffer, bufferSize, iniFile.c_str());
|
int res = GetPrivateProfileString((*iter).first.c_str(), strKey.c_str(), L"", buffer, bufferSize, iniFile.c_str());
|
||||||
if (res != size - 2) break; // Fits in the buffer
|
if (res < bufferSize - 2) break; // Fits in the buffer
|
||||||
|
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
bufferSize *= 2;
|
bufferSize *= 2;
|
||||||
buffer = new WCHAR[size];
|
buffer = new WCHAR[bufferSize];
|
||||||
};
|
};
|
||||||
|
|
||||||
SetValue((*iter).first, strKey, buffer);
|
SetValue((*iter).first, strKey, buffer);
|
||||||
|
@ -1417,7 +1417,7 @@ void CMeterWindow::ReadSkin()
|
|||||||
{
|
{
|
||||||
int res = GetPrivateProfileString( NULL, NULL, NULL, items, size, iniFile.c_str());
|
int res = GetPrivateProfileString( NULL, NULL, NULL, items, size, iniFile.c_str());
|
||||||
if (res == 0) return; // File not found
|
if (res == 0) return; // File not found
|
||||||
if (res != size - 2) break; // Fits in the buffer
|
if (res < size - 2) break; // Fits in the buffer
|
||||||
|
|
||||||
delete [] items;
|
delete [] items;
|
||||||
size *= 2;
|
size *= 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user