From 519459c5e1197bd66262b3d5eb1f12ee8013e0c7 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sat, 26 Mar 2022 20:03:50 -0700
Subject: [PATCH] De-duplicate at the first '.' following the filename, not the
 path

Fix the fix to issue #380.

Thanks for letting me know Keyop.
---
 src/sbbs3/prntfile.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/prntfile.cpp b/src/sbbs3/prntfile.cpp
index 53239bb8b1..5a1de95822 100644
--- a/src/sbbs3/prntfile.cpp
+++ b/src/sbbs3/prntfile.cpp
@@ -350,7 +350,7 @@ bool sbbs_t::random_menu(const char *name, long mode, JSObject* obj)
 		return false;
 	}
 	for(size_t i = 0; i < g.gl_pathc; i++) {
-		char* ext = strchr(g.gl_pathv[i], '.'); // intentionally not using getfext() - issue #380
+		char* ext = strchr(getfname(g.gl_pathv[i]), '.'); // intentionally not using getfext() - issue #380
 		if(ext == NULL)
 			continue;
 		*ext = 0;
-- 
GitLab