summaryrefslogtreecommitdiffstats
path: root/source/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/history.c')
-rw-r--r--source/history.c2
1 files changed, 1 insertions, 1 deletions
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;