修复获取进程名称时未清空缓冲区导致匹配失败的问题
This commit is contained in:
parent
ab90d03a06
commit
58b14e7639
|
@ -250,7 +250,7 @@ extern "C"
|
|||
|
||||
return u2utf8(path);
|
||||
#else
|
||||
char path[256];
|
||||
char path[256] = { 0 };
|
||||
int len = readlink("/proc/self/exe", path, sizeof(path) - 1);
|
||||
|
||||
if (len > 0 && len < sizeof(path))
|
||||
|
|
Loading…
Reference in New Issue