From: Pierre Schweitzer Date: Tue, 1 Sep 2015 22:32:55 +0000 (+0000) Subject: [NTOSKRNL] X-Git-Tag: ReactOS-0.4.0~1120 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=9bd7b0644873d840b969427c5efaded6a974a51b [NTOSKRNL] Fix KdpPrompt(): - Don't attempt to return in the middle of the loop. It leads to keep the mouse disabled instead of reenabling it. - Also, return a string length that actually matches what was written to the output buffer. This fixes invalid behavior on RtlAssert when used with #if 0 moved to #if 1, or when Windows NTDLL is used in ReactOS. CORE-10082 #resolve #comment Fixed with r68905 CORE-10083 #resolve #comment Fixed with r68905 svn path=/trunk/; revision=68905 --- diff --git a/reactos/ntoskrnl/kdbg/kdb_cli.c b/reactos/ntoskrnl/kdbg/kdb_cli.c index f37d534a6b8..f2940ed655a 100644 --- a/reactos/ntoskrnl/kdbg/kdb_cli.c +++ b/reactos/ntoskrnl/kdbg/kdb_cli.c @@ -3745,19 +3745,7 @@ KdpPrompt(IN LPSTR InString, * DbgPrompt does not null terminate, but it does */ *(PCHAR)(OutString + i) = 0; - - /* Print a new line */ - KdPortPutByteEx(&SerialPortInfo, '\r'); - KdPortPutByteEx(&SerialPortInfo, '\n'); - - /* Release spinlock */ - KiReleaseSpinLock(&KdpSerialSpinLock); - - /* Lower IRQL back */ - KeLowerIrql(OldIrql); - - /* Return the length */ - return OutStringLength + 1; + break; } /* Write it back and print it to the log */ @@ -3779,5 +3767,5 @@ KdpPrompt(IN LPSTR InString, KeLowerIrql(OldIrql); /* Return the length */ - return OutStringLength; + return i; }