diff --git a/Changelog b/Changelog new file mode 100644 index 00000000..423be330 --- /dev/null +++ b/Changelog @@ -0,0 +1,2 @@ +21 June 2003 ++ Fix error where we could allocate a used sector! ARGH! diff --git a/dos33.c b/dos33.c index 386cf450..0a64acc2 100644 --- a/dos33.c +++ b/dos33.c @@ -250,6 +250,8 @@ int find_first_one(unsigned char byte) { int i=0; + if (byte==0) return -1; + while((byte& (0x1<-1;byte--) { bitmap[byte]=buffer[VTOC_FREE_BITMAPS+(i*4)+byte]; if (bitmap[byte]!=0x00) { @@ -321,7 +323,7 @@ int dos33_allocate_sector(int fd) { found_track=i; /* clear bit indicating in use */ buffer[VTOC_FREE_BITMAPS+(i*4)+byte]&=~(0x1<