[Coco] Telnet and DW

Christopher Hawks chawks at dls.net
Fri Jan 1 16:35:46 EST 2010


Christopher Hawks said the following on 01/01/2010 01:14 PM:
> Aaron Wolfe said the following on 12/30/2009 09:48 PM:
>> OK, that error is happening in a routine that pulls the disk name and
>> some other info out of .dsk files.  It's purely cosmetic at this
>> point.  Maybe just comment out line 171 of  DWDiskDrives.java   It
>> won't have any effect on the server.  If you want to email me your
>> .dsk file I'll try to figure out why that routine can't grok it.
> 
> Aaron:
> 
>     The problem is caused by cocoString(byte[] bytes) in DWDisk.java 
> processing too many bytes if the bytes array is not NULL terminated 
> (like mine was).
> 
> Line 171 (of DWDisk.java) should read:
> while ((i < bytes.length - 1) && (bytes[i] > 0))
> 
>     Then my original .dsk image works correctly.
> 

Ooppss!

	Toolshed's os9 format also has a problem! It does not truncate the filename to 
32 chars before setting the high bit of the last char. So, if you pass it a 
name longer than 32 chars, it does not set the high bit of the 32nd char.

Boisy (or Tim):


	Add this before do_format() is called by os9format() in os9format.c. (about 
line 238.)

/* Max of 32 chars */
if(strlen(diskName) > 32)
	diskName[32] = 0;


-- 
Christopher R. Hawks
HAWKSoft
---------------------------------------------------------
"Anybody that wants the presidency so much that he'll spend two years
organizing and campaigning for it is not to be trusted with the office."
	-- David Broder



More information about the Coco mailing list