Commit eb3bd6ec authored by Laszlo Csomor's avatar Laszlo Csomor

io_win32_unittest: fix condition in GetCwdAsUtf8

parent 3f1b1a6d
......@@ -130,7 +130,7 @@ bool GetEnvVarAsUtf8(const WCHAR* name, string* result) {
bool GetCwdAsUtf8(string* result) {
DWORD size = ::GetCurrentDirectoryW(0, NULL);
if (size == 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
if (size > 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
scoped_array<WCHAR> wcs(new WCHAR[size]);
::GetCurrentDirectoryW(size, wcs.get());
// GetCurrentDirectoryA retrieves an Active-Code-Page-encoded text which
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment