patch 8.2.2497: no error when using more than one character for a register

Problem:    No error when using more than one character for a register name.
Solution:   In Vim9 script check for a single character string. (closes #7814)
            Fix that VAR_BOOL and VAR_SPECIAL are not considered equal.
diff --git a/src/typval.c b/src/typval.c
index 65e07b3..1cdab93 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -1069,7 +1069,9 @@
 	return r;
     }
 
-    if (tv1->v_type != tv2->v_type)
+    if (tv1->v_type != tv2->v_type
+	    && ((tv1->v_type != VAR_BOOL && tv1->v_type != VAR_SPECIAL)
+		|| (tv2->v_type != VAR_BOOL && tv2->v_type != VAR_SPECIAL)))
 	return FALSE;
 
     switch (tv1->v_type)