Fix for my tweak in the last commit. I knew I had that working at one point.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6369 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-11-10 05:18:20 +00:00
parent 92a5b72b42
commit 895f1500a5
1 changed files with 4 additions and 1 deletions

View File

@ -69,8 +69,11 @@ std::string StringFromFormat(const char* format, ...)
#ifndef _WIN32
// vsnprintf does not return -1 on truncation in linux!
// Instead it returns the size of the string we need.
if (writtenCount >= (int)newSize)
if (writtenCount > (int)newSize)
{
newSize = writtenCount;
writtenCount = -1;
}
#else
newSize *= 2;
#endif