diff --git a/src/sbbs3/prntfile.cpp b/src/sbbs3/prntfile.cpp
index 53239bb8b19353a551db10c0ddffb4ebf650c85b..5a1de95822ff56f4740fbb5da4b2663aa1ad6396 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;