From f5b5cdb27508cfa0808e3f1d8d51938e4eb5f21b Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Wed, 6 May 2020 17:00:29 +0200 Subject: [PATCH] debug --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 2ab1953..859eb6a 100644 --- a/main.c +++ b/main.c @@ -123,8 +123,8 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[] ) return 5; } fgets( str, 1024, fh1); - pos = strstr( str, "USER=") + 5; - sprintf( user, "%s", pos); + pos = strstr( str, "USER="); + sprintf( user, "%s", pos+5); fclose(fh1); return retval; }