Change workaround for bug in Nullsoft installer.

svn path=/trunk/; revision=7995
This commit is contained in:
Gé van Geldorp 2004-02-02 15:51:29 +00:00
parent 08b2e62907
commit a474343fb9

View file

@ -126,12 +126,17 @@ int _RTFGetChar(RTF_Info *info)
{ {
char buff[10]; char buff[10];
long pcb; long pcb;
memset(buff, '\0', sizeof(buff)); /* Workaround for bug in Nullsoft installer */ info->editstream.pfnCallback(info->editstream.dwCookie, buff, sizeof(buff), &pcb);
info->editstream.pfnCallback(info->editstream.dwCookie, buff, 1, &pcb);
if(pcb == 0) if(pcb == 0)
return EOF; return EOF;
else 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); myChar = CHARLIST_Dequeue(&info->inputCharList);
return (int) myChar; return (int) myChar;