Merge "Fix issue with setting of thread name"
This commit is contained in:
commit
63dca90436
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator,
|
||||||
if (mThandle) {
|
if (mThandle) {
|
||||||
// set thread name
|
// set thread name
|
||||||
char lname[16];
|
char lname[16];
|
||||||
int len = (sizeof(lname)>sizeof(threadName)) ?
|
int len = (sizeof(lname) > (strlen(threadName) + 1)) ?
|
||||||
(sizeof(threadName) -1):(sizeof(lname) - 1);
|
(strlen(threadName)):(sizeof(lname) - 1);
|
||||||
memcpy(lname, threadName, len);
|
memcpy(lname, threadName, len);
|
||||||
lname[len] = 0;
|
lname[len] = 0;
|
||||||
// set the thread name here
|
// set the thread name here
|
||||||
|
|
Loading…
Reference in a new issue