From 254767604388d11fd1870f859c3974f151a4669e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 21 Jul 2019 16:03:28 -0500 Subject: [PATCH] Update: use memcpy instead of strncat --- level_1/fl_directory/c/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_1/fl_directory/c/directory.c b/level_1/fl_directory/c/directory.c index 86c6a4b..407be38 100644 --- a/level_1/fl_directory/c/directory.c +++ b/level_1/fl_directory/c/directory.c @@ -44,7 +44,7 @@ extern "C" { return status; } - strncat(names->array[names->used].string, listing[counter]->d_name, size); + memcpy(names->array[names->used].string, listing[counter]->d_name, sizeof(f_autochar) * size); names->array[names->used].used = size; names->used++; } -- 1.8.3.1