mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
git: Various style fixes everywhere, removing whitespaces (#321)
* repo-wide: trim trailing spaces Note: This doesn't touch the .tbl files in encodings/ since they include meaningful trailing spaces (`20= `) * patterns: clean up duplicate semicolons * ELF: add header magic check * glTF: use type::Magic for magic value * glTF: check that the file size in the header matches * xgstexture: fix generics syntax for magic value * JPEG: define hex enum with 0x00 instead of 0X00 * CI: update deprecated actions --------- Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
@@ -40,21 +40,21 @@ VectorTable vector_table @ VTOR;
|
||||
|
||||
fn main() {
|
||||
u32 table_size = sizeof(vector_table);
|
||||
|
||||
|
||||
u32 default_handler_address = 0x00;
|
||||
|
||||
|
||||
for (u32 i = 4, i < table_size, i = i + 4) {
|
||||
u32 occurrences = 0;
|
||||
for (u32 j = 4, j < table_size, j = j + 4) {
|
||||
if (std::mem::read_unsigned(i, 4) == std::mem::read_unsigned(j, 4)) {
|
||||
occurrences = occurrences + 1;
|
||||
|
||||
|
||||
if (occurrences > 1)
|
||||
default_handler_address = std::mem::read_unsigned(i, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (default_handler_address != 0x00)
|
||||
std::print("Default Handler implementation at 0x{:08X}", default_handler_address);
|
||||
};
|
||||
Reference in New Issue
Block a user