the contents of buf is received through a socket.Code:if(strstr(buf,"PING")) { sscanf(buf,"PING :%s",str); printf("BOT WILL SEND BACK %s\n",str); }
buf is declared as char buf[1024];
strstr finds PING but sscanf does not place it into str.
In fact, str is blank.
That is the correct format as well so the statement isn't wrong.
Why would be str be coming back black?
Thanks