Fix v8 build on windows

reported to v8 in http://codereview.chromium.org/6056006/
This commit is contained in:
Bert Belder 2011-01-17 21:12:56 +01:00 committed by Ryan Dahl
parent cf2e4f44af
commit 595509bb4c

View File

@ -1474,7 +1474,7 @@ Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) {
void Thread::set_name(const char* name) {
strncpy_s(name_, name, sizeof(name_));
strncpy_s(name_, sizeof(name_), name, strlen(name));
name_[sizeof(name_) - 1] = '\0';
}