From e3c3fe8e9534b014bced04ef084a0c6be6ef4bee Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Tue, 14 Sep 2004 22:30:56 +0000 Subject: [PATCH] - Fixed the length calculation in WriteConsoleOutputAttribute. svn path=/trunk/; revision=10860 --- reactos/lib/kernel32/misc/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/kernel32/misc/console.c b/reactos/lib/kernel32/misc/console.c index 9479a173ebb..793e6d301f9 100644 --- a/reactos/lib/kernel32/misc/console.c +++ b/reactos/lib/kernel32/misc/console.c @@ -1,4 +1,4 @@ -/* $Id: console.c,v 1.80 2004/09/10 22:14:52 gvg Exp $ +/* $Id: console.c,v 1.81 2004/09/14 22:30:56 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -2237,7 +2237,7 @@ WriteConsoleOutputAttribute( { Size = nLength > CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB ? CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB : nLength; Request->Data.WriteConsoleOutputAttribRequest.Length = Size; - for( c = 0; c < ( Size * 2 ); c++ ) + for( c = 0; c < Size; c++ ) Request->Data.WriteConsoleOutputAttribRequest.String[c] = (char)lpAttribute[c]; Status = CsrClientCallServer( Request, &Reply, sizeof( CSRSS_API_REQUEST ) + (Size * 2), sizeof( CSRSS_API_REPLY ) ); if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply.Status ) )