diff --git a/main.c b/main.c index 040dc54..40705fc 100644 --- a/main.c +++ b/main.c @@ -136,7 +136,7 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[] ) null2space( str ); if ( (pos = strstr( str, "USER=")) != NULL) { - sscanf( pos, "%s", user); + sscanf( pos+5, "%s", user); } return retval; } @@ -209,7 +209,7 @@ int main() //get the list of children if ( (n=getpids( pid, pids )) != -1) { - for ( y=0; y<=n; y++) + for ( y=0; y