修复获取进程名称时未清空缓冲区导致匹配失败的问题

This commit is contained in:
gb 2022-05-18 11:35:55 +08:00
parent ab90d03a06
commit 58b14e7639
1 changed files with 1 additions and 1 deletions

View File

@ -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))