From 3c5287c859153b813b750cdfd6aeb983ea36be68 Mon Sep 17 00:00:00 2001 From: Phillip Susi Date: Thu, 1 Feb 2001 00:04:44 +0000 Subject: [PATCH] Forgot to commit bug fix for LoadString() svn path=/trunk/; revision=1588 --- reactos/lib/user32/resources/sysres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/user32/resources/sysres.c b/reactos/lib/user32/resources/sysres.c index e050cf83753..2fbadf1a384 100644 --- a/reactos/lib/user32/resources/sysres.c +++ b/reactos/lib/user32/resources/sysres.c @@ -61,9 +61,9 @@ LoadStringA( HINSTANCE hInstance, SetLastErrorByStatus( Status ); return 0; } + nBufferMax--; // save room for the null if( nBufferMax > AString.Length ) nBufferMax = AString.Length; - nBufferMax--; // save room for the null memcpy( lpBuffer, AString.Buffer, nBufferMax ); lpBuffer[nBufferMax] = 0; RtlFreeAnsiString( &AString );