Windows is returning the length of the string, plus the CRLF

delimiters, whereas wineconsole is returning one less.
This commit is contained in:
Joshua Davies 2005-10-06 11:35:24 +00:00 committed by Alexandre Julliard
parent fac3698fc2
commit dcba743bd1
1 changed files with 2 additions and 1 deletions

View File

@ -372,7 +372,8 @@ static void WCEL_FindPrevInHist(WCEL_Context* ctx)
static void WCEL_Done(WCEL_Context* ctx)
{
WCHAR nl = '\n';
if (!WCEL_Grow(ctx, 1)) return;
if (!WCEL_Grow(ctx, 2)) return;
ctx->line[ctx->len++] = '\r';
ctx->line[ctx->len++] = '\n';
ctx->line[ctx->len] = 0;
WriteConsoleW(ctx->hConOut, &nl, 1, NULL, NULL);