Signed-off-by: MarkusVolk <f_l_k@t-online.de>

Signed-off-by: Thilo Graf <dbt@novatux.de>
commit was: screensaver.cpp: avoid unterminated strings
This commit is contained in:
MarkusVolk
2020-01-14 18:41:26 +01:00
committed by Thilo Graf
parent 0ded4a73eb
commit 6b2e67dafd

View File

@@ -274,7 +274,7 @@ bool CScreenSaver::ReadDir()
//printf("%d\n",curr_lenght); //printf("%d\n",curr_lenght);
if(curr_lenght > 4) if(curr_lenght > 4)
{ {
strncpy(curr_ext,(*dirpointer).d_name+(curr_lenght-4),sizeof(curr_lenght)-1); strncpy(curr_ext,(*dirpointer).d_name+(curr_lenght-4),sizeof(curr_ext)-1);
//printf("%s\n",curr_ext); //printf("%s\n",curr_ext);
if (strcasecmp(".jpg",curr_ext) && strcasecmp(".png",curr_ext)) if (strcasecmp(".jpg",curr_ext) && strcasecmp(".png",curr_ext))