From 4b9edb3d826f01970d8390817c0c434428a68cb7 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 30 Dec 2016 11:25:09 -0500 Subject: [PATCH] Patch from Gentoo Gentoo has been carrying this patch for quite a while: https://github.com/gentoo/gentoo/blob/1c79f4dc1b1a367ecfc9324bf50f2558efdb2c45/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch --- fortune-mod/fortune/fortune.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fortune-mod/fortune/fortune.c b/fortune-mod/fortune/fortune.c index aee68da..c0a34bc 100644 --- a/fortune-mod/fortune/fortune.c +++ b/fortune-mod/fortune/fortune.c @@ -990,7 +990,7 @@ int form_file_list(register char **files, register int file_cnt) if (!ret) ret=add_file(percent, fullpathname, NULL, &File_list, &File_tail, NULL); - if ( (!ret && fullpathname != locpathname) || strcmp(sp, "all") == 0 ) + if ( !ret && strncmp(fullpathname, locpathname, sizeof(fullpathname))) ret=add_file(percent, locpathname, NULL, &File_list, &File_tail, NULL); @@ -1001,7 +1001,8 @@ int form_file_list(register char **files, register int file_cnt) } if (!ret) return FALSE; - + if (strncmp(fullpathname, locpathname, sizeof(fullpathname)) && strcmp(sp, "all") == 0) + add_file(percent, locpathname, NULL, &File_list, &File_tail, NULL); } else if (!add_file(percent, fullpathname, NULL, &File_list, -- 2.40.0