Skip to content

Commit

Permalink
Fix a compilation warning (from far2l PR)
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Jan 31, 2025
1 parent 3519432 commit c794acc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions inside/src/inside.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ static const char *DetectPlainKind(const char *Name, const unsigned char *Data,
|| strcasecmp(ext, ".drv") == 0 || strcasecmp(ext, ".ocx") == 0 || strcasecmp(ext, ".efi") == 0)) {
return "PE";

} else if (DataSize >= 8 && (Data[0] == 0xfe && Data[1] == 0xed && Data[2] == 0xfa && Data[3] == 0xce) ||
(Data[0] == 0xce && Data[1] == 0xfa && Data[2] == 0xed && Data[3] == 0xfe) ||
(Data[0] == 0xca && Data[1] == 0xfe && Data[2] == 0xba && Data[3] == 0xbe)) {
return "Mach-O";

} else if ((DataSize >= 8 && (Data[0] == 0xfe && Data[1] == 0xed && Data[2] == 0xfa && Data[3] == 0xce)) ||
(Data[0] == 0xce && Data[1] == 0xfa && Data[2] == 0xed && Data[3] == 0xfe) ||
(Data[0] == 0xca && Data[1] == 0xfe && Data[2] == 0xba && Data[3] == 0xbe)) {
return "Mach-O";
}

return nullptr;
Expand Down

0 comments on commit c794acc

Please sign in to comment.