Skip to content

Commit

Permalink
Fix loading of DSDs. Hopefully closes #418
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Jul 10, 2024
1 parent b9fac2c commit f907572
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ export function discFor(fdc, name, stringData, onChange) {
const data = typeof stringData !== "string" ? stringData : utils.stringToUint8Array(stringData);

if (fdc.isPulseLevel) {
const lowerName = name.toLowerCase();
const disc = new Disc(true, new DiscConfig(), name);
if (name.toLowerCase().endsWith(".hfe")) {
if (lowerName.endsWith(".hfe")) {
return loadHfe(disc, data);
}
return loadSsd(disc, data, false, onChange);
return loadSsd(disc, data, lowerName.endsWith(".dsd"), onChange);
}

const prevData = new Uint8Array(data);
Expand Down

0 comments on commit f907572

Please sign in to comment.