mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2025-01-15 00:42:05 +08:00
Use qstrncpy
Fixes MSVC C4996 warning.
This commit is contained in:
parent
bae7c331ca
commit
c5042727ae
@ -187,8 +187,7 @@ void SingleApplicationPrivate::startPrimary()
|
|||||||
|
|
||||||
inst->primary = true;
|
inst->primary = true;
|
||||||
inst->primaryPid = q->applicationPid();
|
inst->primaryPid = q->applicationPid();
|
||||||
strncpy( inst->primaryUser, getUsername().toUtf8().data(), 127 );
|
qstrncpy( inst->primaryUser, getUsername().toUtf8().data(), sizeof(inst->primaryUser) );
|
||||||
inst->primaryUser[127] = '\0';
|
|
||||||
inst->checksum = blockChecksum();
|
inst->checksum = blockChecksum();
|
||||||
|
|
||||||
instanceNumber = 0;
|
instanceNumber = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user