summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 9857303bb..22bffa276 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3684,6 +3684,8 @@ spname(char *oldname)
 	thresh = (int)(p - spnameguess) / 4 + 1;
 	if (thresh < 3)
 	    thresh = 3;
+	else if (thresh > 100)
+	    thresh = 100;
 	if ((thisdist = mindist(newname, spnameguess, spnamebest)) >= thresh) {
 	    /* The next test is always true, except for the first path    *
 	     * component.  We could initialize bestdist to some large     *