mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-22 21:40:19 +00:00
fix(portability): replace POSIX-only string funcs and legacy hostent fields
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <glib.h>
|
||||
/* X-Chat
|
||||
* Copyright (C) 1998 Peter Zelezny.
|
||||
*
|
||||
@@ -24,7 +25,7 @@ void
|
||||
history_add (struct history *his, char *text)
|
||||
{
|
||||
free (his->lines[his->realpos]);
|
||||
his->lines[his->realpos] = strdup (text);
|
||||
his->lines[his->realpos] = g_strdup(text);
|
||||
his->realpos++;
|
||||
if (his->realpos == HISTORY_SIZE)
|
||||
his->realpos = 0;
|
||||
|
||||
Reference in New Issue
Block a user