mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Merge pull request #1315 from pekdon/otr_g_strndup
Use g_strndup, strndup is not available on old platforms
This commit is contained in:
commit
58c9aecf86
@ -643,7 +643,7 @@ static enum otr_msg_status enqueue_otr_fragment(const char *msg, struct otr_peer
|
||||
* Dup the string with enough space for the NULL byte since we are
|
||||
* about to free it before passing it to the caller.
|
||||
*/
|
||||
*full_msg = strndup(opc->full_msg, opc->msg_len + 1);
|
||||
*full_msg = g_strndup(opc->full_msg, opc->msg_len + 1);
|
||||
/* Reset everything. */
|
||||
free(opc->full_msg);
|
||||
opc->full_msg = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user