GH #575: fixed compile error if POCO_WIN32_UTF8 is not defined

This commit is contained in:
Günter Obiltschnig 2014-10-16 12:57:34 +02:00
parent d864a9b7ea
commit 1db210e8b9

View File

@ -135,10 +135,10 @@ std::string WinRegistryKey::getString(const std::string& name)
throw NotFoundException(key(name));
if (size > 0)
{
Poco::Buffer<char> buffer(new char[size + 1]);
Poco::Buffer<char> buffer(size + 1);
RegQueryValueExA(_hKey, name.c_str(), NULL, NULL, (BYTE*) buffer.begin(), &size);
buffer[size] = 0;
std::string result(buffer);
std::string result(buffer.begin());
return result;
}
#endif