From 0682ec9a42124a4ac044bb86d48317bb38f52996 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Tue, 14 Jan 1997 19:16:13 +0100
Subject: [PATCH] * dynamic_load.c (f_load_module): Now strips filename
 extension, instead of keeping only leading [a-zA-Z]+. Thus handles symbols
 containing underscore better.

Rev: src/dynamic_load.c:1.7
---
 src/dynamic_load.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/dynamic_load.c b/src/dynamic_load.c
index c07ff803ca..52a7bfc6ee 100644
--- a/src/dynamic_load.c
+++ b/src/dynamic_load.c
@@ -59,11 +59,11 @@ void f_load_module(INT32 args)
       {
 	strcpy(buf1, foo);
 	foo=buf1;
-      
-	while((*foo >= 'a' && *foo <= 'z' ) || (*foo >= 'A' && *foo <= 'Z' ))
-	  foo++;
 
-	*foo=0;
+	/* Strip extension, if any */
+	foo = STRCHR(foo, '.');
+	if (foo)
+	  *foo=0;
       
 	strcpy(buf2,"init_");
 	strcat(buf2,buf1);
-- 
GitLab