FormatMessageW: Allocate anough space.

This commit is contained in:
Uwe Bonnes 2003-10-28 21:09:32 +00:00 committed by Alexandre Julliard
parent 717107bb65
commit 143f075335
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ DWORD WINAPI FormatMessageW(
sprintf(fmtstr,"%%%s",f);
f=x+1;
} else {
fmtstr=HeapAlloc(GetProcessHeap(),0,strlen(f));
fmtstr=HeapAlloc(GetProcessHeap(),0,strlen(f)+2);
sprintf(fmtstr,"%%%s",f);
f+=strlen(f); /*at \0*/
}