Skip to content

Instantly share code, notes, and snippets.

@JFreegman
Created April 2, 2014 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JFreegman/9944834 to your computer and use it in GitHub Desktop.
Save JFreegman/9944834 to your computer and use it in GitHub Desktop.
/* get current peername then sort namelist */
uint8_t peername[TOX_MAX_NAME_LENGTH];
if (change != TOX_CHAT_CHANGE_PEER_DEL) {
uint16_t n_len = groupchats[groupnum].peer_name_lengths[peernum];
memcpy(peername, &groupchats[groupnum].peer_names[peernum*TOX_MAX_NAME_LENGTH], sizeof(peername));
peername[n_len] = '\0';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment