Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char buffer[2048];
- char *sp;
- /* read packet into buffer here, omitted */
- /* now find that space. */
- sp = strchr(buffer, ' ');
- if(sp != NULL)
- {
- /* 0-terminate the first part, by replacing the space with a '