Mobile Mouse Server and CloudApp both return an empty string through the CopyProcessName method. Returning nil instead of empty string makes Sloth go to another way of finding the correct process name.
Fix call to proc_name
Although not documented, the proc_name method returns 0 on failure and the legth of the process name on success. In release configuration, it is not a problem but in debug configuration Sloth was going through +procNameForPID: and returned whatever was in the uninitialized name[1024] buffer when the proc_name call failed.
Fix empty process names
Mobile Mouse Server and CloudApp both return an empty string through the
CopyProcessName
method. Returning nil instead of empty string makes Sloth go to another way of finding the correct process name.Fix call to proc_name
Although not documented, the
proc_name
method returns 0 on failure and the legth of the process name on success. In release configuration, it is not a problem but in debug configuration Sloth was going through +procNameForPID: and returned whatever was in the uninitializedname[1024]
buffer when theproc_name
call failed.