dos33: mkdos33fs: fix really embarassing = vs == bug

the catalog code was mostly working by accident

should never have learned Pascal first
This commit is contained in:
Vince Weaver 2022-09-05 21:09:00 -04:00
parent bd9ab1915a
commit 301eb86fc6

View File

@ -429,18 +429,20 @@ continue_parsing_catalog:
i++;
}
if ((catalog_track=0x11) && (catalog_sector==1)) {
/* in theory can only have 105 files */
catalog_track=catalog_buffer[CATALOG_NEXT_T];
catalog_sector=catalog_buffer[CATALOG_NEXT_S];
if ((catalog_track==0x0) && (catalog_sector==0)) {
/* FIXME: should really check this before we */
/* allocate space for the file, we leak */
/* if full, we have no recourse! */
/* can we allocate new catalog sectors */
/* can we auto-allocate new catalog sectors? */
/* and point to them?? */
fprintf(stderr,"Error! No more room for files!\n");
return -ERROR_CATALOG_FULL;
}
catalog_track=catalog_buffer[CATALOG_NEXT_T];
catalog_sector=catalog_buffer[CATALOG_NEXT_S];
goto continue_parsing_catalog;
got_a_dentry: