mirror of
https://github.com/fadden/ciderpress.git
synced 2024-12-20 23:29:17 +00:00
Gutenberg tweaks
Changed the catalog scan offset so we don't overrun the buffer. Changed a strcpy() to strncpy(). Added Gutenberg to the list of formats MDC outputs.
This commit is contained in:
parent
090797a76f
commit
1362c73a7e
@ -22,7 +22,7 @@ const int kMaxVolNameLen = 9;
|
||||
const int kSctSize = 256;
|
||||
const int kVTOCTrack = 17;
|
||||
const int kVTOCSector = 7;
|
||||
const int kCatalogEntryOffset = 0x20; // first entry in cat sect starts here
|
||||
const int kCatalogEntryOffset = 0x10; // first entry in cat sect starts here
|
||||
const int kCatalogEntrySize = 16; // length in bytes of catalog entries
|
||||
const int kCatalogEntriesPerSect = 15; // #of entries per catalog sector
|
||||
const int kEntryDeleted = 0x40; // this is used to designate deleted files
|
||||
|
@ -348,9 +348,10 @@ LoadDiskFSContents(DiskFS* pDiskFS, const char* volName,
|
||||
if (strlen(ccp) == 0)
|
||||
ccp = kBlankFileName;
|
||||
|
||||
if (subVolName[0] == '\0')
|
||||
strcpy(dispName, ccp);
|
||||
else {
|
||||
if (subVolName[0] == '\0') {
|
||||
strncpy(dispName, ccp, sizeof(dispName));
|
||||
dispName[sizeof(dispName) - 1] = '\0';
|
||||
} else {
|
||||
snprintf(dispName, sizeof(dispName), "%s:%s", subVolName, ccp);
|
||||
//dispName = subVolName;
|
||||
//dispName += ':';
|
||||
@ -470,6 +471,9 @@ LoadDiskFSContents(DiskFS* pDiskFS, const char* volName,
|
||||
case DiskImg::kFormatRDOS3:
|
||||
fmtStr = "RDOS ";
|
||||
break;
|
||||
case DiskImg::kFormatGutenberg:
|
||||
fmtStr = "Gutenb";
|
||||
break;
|
||||
default:
|
||||
fmtStr = "??? ";
|
||||
break;
|
||||
|
@ -856,6 +856,9 @@ int MainWindow::LoadDiskFSContents(DiskFS* pDiskFS, const char* volName,
|
||||
case DiskImg::kFormatMSDOS:
|
||||
fmtStr = "MS-DOS";
|
||||
break;
|
||||
case DiskImg::kFormatGutenberg:
|
||||
fmtStr = "Gutenb";
|
||||
break;
|
||||
default:
|
||||
fmtStr = "??? ";
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user