[ros-diffs] [mkupfer] 34275: - Fix to allow characters for computer name as specified in MSDN, even '-' - See issue #3304 for more details.

mkupfer at svn.reactos.org mkupfer at svn.reactos.org
Thu Jul 3 09:09:05 CEST 2008


Author: mkupfer
Date: Thu Jul  3 02:09:05 2008
New Revision: 34275

URL: http://svn.reactos.org/svn/reactos?rev=34275&view=rev
Log:
- Fix to allow characters for computer name as specified in MSDN, even '-'
- See issue #3304 for more details.

Modified:
    trunk/reactos/dll/win32/kernel32/misc/computername.c

Modified: trunk/reactos/dll/win32/kernel32/misc/computername.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/computername.c?rev=34275&r1=34274&r2=34275&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/computername.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/computername.c [iso-8859-1] Thu Jul  3 02:09:05 2008
@@ -298,22 +298,10 @@
   p = (PWCHAR)lpComputerName;
   while (*p != 0)
     {
-      if ((!iswctype (*p, _ALPHA) && !iswctype (*p, _DIGIT)) ||
-	    *p == L'!' ||
-	    *p == L'@' ||
-	    *p == L'#' ||
-	    *p == L'$' ||
-	    *p == L'%' ||
-	    *p == L'^' ||
-	    *p == L'&' ||
-	    *p == L'\'' ||
-	    *p == L')' ||
-	    *p == L'(' ||
-	    *p == L'.' ||
-	    *p == L'_' ||
-	    *p == L'{' ||
-	    *p == L'}' ||
-	    *p == L'~')
+      if (!(iswalnum(*p) || *p == L'!' || *p == L'@' || *p == L'#' ||
+       *p == L'$' || *p == L'%' || *p == L'^' || *p == L'&' || *p == L'\'' ||
+       *p == L')' || *p == L'(' || *p == L'.' || *p == L'-' || *p == L'_' ||
+       *p == L'{' || *p == L'}' || *p == L'~'))
 	return FALSE;
 
       Length++;



More information about the Ros-diffs mailing list