Typo fix. I was thinking oct not dec.
Modified: trunk/reactos/subsys/win32k/ntuser/keyboard.c
_____
Modified: trunk/reactos/subsys/win32k/ntuser/keyboard.c
--- trunk/reactos/subsys/win32k/ntuser/keyboard.c 2005-07-13
23:22:20 UTC (rev 16559)
+++ trunk/reactos/subsys/win32k/ntuser/keyboard.c 2005-07-14
00:27:53 UTC (rev 16560)
@@ -1153,7 +1153,7 @@
0x01 Shift key
0x02 Ctrl key
0x04 Alt key
- Should have only 7 valid possibilities.
+ Should have only 8 valid possibilities. Including zero.
*/
for(CapsState = 0; CapsState < vtwTbl->nModifications;
CapsState++)
{
only NULL-terminate the string in GetEnvironmentVariableW if the buffer
size is greater than 0. Thanks to Joseph Galbraith for the hint
Modified: trunk/reactos/lib/kernel32/misc/env.c
_____
Modified: trunk/reactos/lib/kernel32/misc/env.c
--- trunk/reactos/lib/kernel32/misc/env.c 2005-07-13 15:46:59 UTC
(rev 16554)
+++ trunk/reactos/lib/kernel32/misc/env.c 2005-07-13 16:36:24 UTC
(rev 16555)
@@ -158,9 +158,12 @@
}
}
- /* make sure the string is NULL-terminated!
RtlQueryEnvironmentVariable_U
- only terminates it if MaximumLength < Length */
- VarValue.Buffer[VarValue.Length / sizeof(WCHAR)] = L'\0';
+ if (nSize != 0)
+ {
+ /* make sure the string is NULL-terminated!
RtlQueryEnvironmentVariable_U
+ only terminates it if MaximumLength < Length */
+ VarValue.Buffer[VarValue.Length / sizeof(WCHAR)] = L'\0';
+ }
return (VarValue.Length / sizeof(WCHAR));
}