- Work around problem in NSIS installers which can't handle 1 char at

a time reading of RTF text.
- Increase buffer to 4096 bytes for better compatibility.
This commit is contained in:
Ge van Geldorp 2004-04-16 23:29:57 +00:00 committed by Alexandre Julliard
parent 8bed3a7b3f
commit 9de14a1c11

View file

@ -124,13 +124,19 @@ int _RTFGetChar(RTF_Info *info)
if(CHARLIST_GetNbItems(&info->inputCharList) == 0)
{
char buff[10];
char buff[4096];
long pcb;
info->editstream.pfnCallback(info->editstream.dwCookie, buff, 1, &pcb);
info->editstream.pfnCallback(info->editstream.dwCookie, buff, sizeof(buff), &pcb);
if(pcb == 0)
return EOF;
else
CHARLIST_Enqueue(&info->inputCharList, buff[0]);
{
int i;
for (i = 0; i < pcb; i++)
{
CHARLIST_Enqueue(&info->inputCharList, buff[i]);
}
}
}
myChar = CHARLIST_Dequeue(&info->inputCharList);
return (int) myChar;