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/co…
==============================================================================
--- 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++;