mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 20:22:31 +01:00
- How i love you microsoft... another win32 fix
This commit is contained in:
parent
2dcbe1473b
commit
94e4a85957
@ -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;}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user