From 86a968c3f424cb70e03cccb24cabf9751f6f636d Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Mon, 14 Oct 2024 20:38:19 +0530 Subject: update gps stack --- gps/utils/LocThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gps/utils/LocThread.cpp') diff --git a/gps/utils/LocThread.cpp b/gps/utils/LocThread.cpp index c1052cb..568a6bb 100644 --- a/gps/utils/LocThread.cpp +++ b/gps/utils/LocThread.cpp @@ -85,8 +85,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator, if (mThandle) { // set thread name char lname[16]; - int len = (sizeof(lname)>sizeof(threadName)) ? - (sizeof(threadName) -1):(sizeof(lname) - 1); + int len = (sizeof(lname) > (strlen(threadName) + 1)) ? + (strlen(threadName)):(sizeof(lname) - 1); memcpy(lname, threadName, len); lname[len] = 0; // set the thread name here -- cgit v1.2.3