Fix status command not working for abbreviated process names

This commit is contained in:
Wolfgang Lux 2019-09-25 14:38:30 +02:00
parent 5ebd62e8d8
commit a1347ffc90
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2019-09-25 Wolfgang Lux <wolfgang.lux@gmail.com>
* EcCommand.m:
Fix bugs that prevent the status command from working for
abbreviated process names.
2019-08-23 Richard Frith-Macdonald <rfm@gnu.org>
* EcCommand.m:

View file

@ -177,12 +177,12 @@ static NSMutableDictionary *launchInfo = nil;
{
NSEnumerator *e = [launchInfo keyEnumerator];
NSString *s;
NSUInteger bestLength = 0;
NSInteger bestLength = 0;
NSString *bestName = nil;
while (nil != (s = [e nextObject]))
{
if (comp(s, abbreviation) == 0)
if (comp(abbreviation, s) == 0)
{
bestName = s;
break;