Fixed one more HeapReAlloc call.

This commit is contained in:
Andrew de Quincey 2003-11-30 02:53:29 +00:00 committed by Alexandre Julliard
parent 3a3ace6e14
commit fc0968d4d1
1 changed files with 6 additions and 0 deletions

View File

@ -296,6 +296,12 @@ int DEBUG_ReadLine(const char* pfx, char* buf, int size)
char* line = NULL; char* line = NULL;
size_t len = 0; size_t len = 0;
/* first alloc of our current buffer */
line = HeapAlloc(GetProcessHeap(), 0, len = 2);
assert(line);
line[0] = '\n';
line[1] = '\0';
DEBUG_FetchEntireLine(pfx, &line, &len, FALSE); DEBUG_FetchEntireLine(pfx, &line, &len, FALSE);
len = strlen(line); len = strlen(line);
/* remove trailing \n */ /* remove trailing \n */