FormatMessageW: Allocate anough space.
This commit is contained in:
parent
717107bb65
commit
143f075335
|
@ -468,7 +468,7 @@ DWORD WINAPI FormatMessageW(
|
||||||
sprintf(fmtstr,"%%%s",f);
|
sprintf(fmtstr,"%%%s",f);
|
||||||
f=x+1;
|
f=x+1;
|
||||||
} else {
|
} else {
|
||||||
fmtstr=HeapAlloc(GetProcessHeap(),0,strlen(f));
|
fmtstr=HeapAlloc(GetProcessHeap(),0,strlen(f)+2);
|
||||||
sprintf(fmtstr,"%%%s",f);
|
sprintf(fmtstr,"%%%s",f);
|
||||||
f+=strlen(f); /*at \0*/
|
f+=strlen(f); /*at \0*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue