mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-04-23 13:05:17 +00:00
Fixed compilation error; formatting fixes
This commit is contained in:
parent
58c418362b
commit
77b693ae08
2 changed files with 5 additions and 7 deletions
|
@ -72,17 +72,17 @@ namespace LBPUnion.UnionPatcher.Gui {
|
|||
ElfFile eboot = new(this.filePicker.FilePath);
|
||||
|
||||
if(eboot.IsValid == false) {
|
||||
this.CreateOkDialog("Eboot Error", $"{eboot.Name} is not a valid ELF file (magic number mismatch)\nThe EBOOT must be decrypted before using this tool").ShowModal();
|
||||
this.CreateOkDialog("EBOOT Error", $"{eboot.Name} is not a valid ELF file (magic number mismatch)\nThe EBOOT must be decrypted before using this tool").ShowModal();
|
||||
return;
|
||||
}
|
||||
|
||||
if(eboot.Is64Bit == null) {
|
||||
this.CreateOkDialog("Eboot Error", $"{eboot.Name} does not target a valid system").ShowModal();
|
||||
this.CreateOkDialog("EBOOT Error", $"{eboot.Name} does not target a valid system").ShowModal();
|
||||
return;
|
||||
}
|
||||
|
||||
if(string.IsNullOrWhiteSpace(eboot.Architecture)) {
|
||||
this.CreateOkDialog("Eboot Error", $"{eboot.Name} does not target a valid architecture (PowerPC or ARM)").ShowModal();
|
||||
this.CreateOkDialog("EBOOT Error", $"{eboot.Name} does not target a valid architecture (PowerPC or ARM)").ShowModal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace LBPUnion.UnionPatcher {
|
|||
|
||||
public string Name { get; } = "Binary Blob";
|
||||
|
||||
public bool IsValid { get; }
|
||||
public bool IsValid { get; } = false;
|
||||
public bool? Is64Bit { get; } = null;
|
||||
public bool? IsBigEndian { get; } = null;
|
||||
public string Architecture { get; } = null;
|
||||
|
@ -35,10 +35,8 @@ namespace LBPUnion.UnionPatcher {
|
|||
public byte[] Contents { get; } = null;
|
||||
|
||||
public ElfFile(byte[] fileContents) {
|
||||
if(fileContents.length < 52) {
|
||||
IsValid = false;
|
||||
if(fileContents.Length < 52)
|
||||
return;
|
||||
}
|
||||
|
||||
IsValid = fileContents[0x00..0x04].SequenceEqual(new byte[] {0x7F, (byte)'E', (byte)'L', (byte)'F'});
|
||||
if(!IsValid) return;
|
||||
|
|
Loading…
Add table
Reference in a new issue