On Fri, Jun 04, 1999 at 03:49:11PM -0400, you [Geoffrey Norton] claimed:
> We've been using TTSSH for some tests with sz and Zmodem in it, and have
> noticed that it crashes at ~20M of data transfered. Anyone know anything
> about this? TIA
Ok, I was wrong suspecting that Ttssh wouldn't perhaps support all the
features of TeraTerm.
I went on trying zmodem, and it seemed quite usable, indeed. I was also
able to reproduce the crash you mentioned, and moreover, it was
reproducible with mere TeraTerm without ttssh.
I actually got bothered to download the TeraTerm source, and this time the
problem turned out the be fairly easy to cure.
I compiled a debug version, and had it crash in SetDlgPercent().
zmodem.c:
(...)
SetDlgPercent(fv->HWin, IDC_PROTOPERCENT,
fv->ByteCount, fv->FileSize);
(...)
dlglib.c:
void SetDlgPercent(HWND HDlg, int id_Item, LONG a, LONG b)
{
int Num;
char NumStr[10];
if (b==0)
Num = 100;
else
Num = 100 * a / b;
sprintf(NumStr,"%u %c",Num,'%');
SetDlgItemText(HDlg, id_Item, NumStr);
}
I changed the function to:
void SetDlgPercent(HWND HDlg, int id_Item, LONG a, LONG b)
{
double Num;
char NumStr[10];
if (b==0)
Num = 100.0;
else
Num = 100.0 * (double)a / (double)b;
sprintf(NumStr,"%3.1f%%",Num);
SetDlgItemText(HDlg, id_Item, NumStr);
}
And this seems to fix it. (I recall something similar was fixed quite
recently in scp, too, though in scp, the bug only resulted in false
statistic numbers, not in crash.)
I submitted the fix to T. Teranishi, who is the author of TeraTerm. I
hope he includes that in the next release.
Otherwise, you may download and compile the TeraTerm source
[http://hp.vector.co.jp/authors/VA002416/teraterm.html] and apply the fix
above. Because of the licensing rules, I'm not allowed to send you the
compiled version.
-- v --
[EMAIL PROTECTED]