Fix possibly wrong use of strncpy_s

This should also fix MinGW build.
Review URL: http://codereview.chromium.org/6376003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sgjesse@chromium.org 2011-01-19 08:34:24 +00:00
parent 6b4d29766c
commit 7d4e4a325b

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_));
OS::StrNCpy(Vector<char>(name_, sizeof(name_)), name, strlen(name));
name_[sizeof(name_) - 1] = '\0';
}