From 63e5f4e9405ed2be83f18b10965b6d66eb5b8a10 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 21 Aug 2014 19:03:21 +0200 Subject: Small cleanup and fixes. * Use g_strfreev * Use g_ascii*strto(u)ll --- source/history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/history.c') diff --git a/source/history.c b/source/history.c index c8ea5ff0..49c6c393 100644 --- a/source/history.c +++ b/source/history.c @@ -144,7 +144,7 @@ void history_set ( const char *filename, const char *entry ) list[length] = g_malloc ( sizeof ( _element ) ); // Copy name if ( list[length] != NULL ) { - strncpy ( list[length]->name, entry, HISTORY_NAME_LENGTH ); + g_strlcpy ( list[length]->name, entry, HISTORY_NAME_LENGTH ); list[length]->name[HISTORY_NAME_LENGTH - 1] = '\0'; // set # hits list[length]->index = 1; -- cgit v1.2.3