mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix string length issue
This commit is contained in:
parent
313f86b648
commit
ccfc39e54a
1 changed files with 4 additions and 2 deletions
|
|
@ -105,9 +105,11 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return new string(buffer, 0, (int)capacity);
|
int validLength = Array.IndexOf(buffer, '\0');
|
||||||
|
if (validLength < 0) validLength = (int)capacity;
|
||||||
|
return new string(buffer, 0, validLength);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue