Skip to content

Commit

Permalink
fix: set fileId for SUC update entries file V5 (#7220)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Oct 7, 2024
1 parent f4dcda4 commit 3e16525
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/nvmedit/src/lib/nvm3/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ export class NVM3Adapter implements NVMAdapter {
if (slice.length > 0) {
const file = new SUCUpdateEntriesFileV5({
updateEntries: slice,
fileId,
fileVersion,
});
changedFiles.push(file);
Expand Down
2 changes: 1 addition & 1 deletion packages/nvmedit/src/lib/nvm3/files/NVMFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class NVMFile {
this.fileId = options.fileId;
this.payload = options.data;
} else {
const fileId = getNVMFileID(this);
const fileId = options.fileId ?? getNVMFileID(this);
if (typeof fileId === "number") {
this.fileId = fileId;
}
Expand Down

0 comments on commit 3e16525

Please sign in to comment.