- How i love you microsoft... another win32 fix

This commit is contained in:
Mark Vejvoda 2010-08-07 06:35:52 +00:00
parent 2dcbe1473b
commit 94e4a85957

View File

@ -18,6 +18,7 @@
#include "vec.h"
using std::string;
using std::min;
using Shared::Platform::int8;
using Shared::Platform::uint8;
using Shared::Platform::int16;
@ -43,7 +44,7 @@ public:
void operator=(const string& str) {
// ensure we don't have a buffer overflow
int maxBufferSize = sizeof(buffer) / sizeof(buffer[0]);
strncpy(buffer, str.c_str(), std::min(S-1,maxBufferSize-1));
strncpy(buffer, str.c_str(), min(S-1,maxBufferSize-1));
}
string getString() const {return buffer;}
};