cnlohr / mini-rv32ima

A tiny C header-only risc-v emulator.
MIT License
1.69k stars 137 forks source link

Fix dtb load length calculation #23

Closed Jcodefox closed 1 year ago

Jcodefox commented 1 year ago

When loading a dtb file the program was subtracting sizeof( struct MiniRV32IMAState ) from the length of the file, essentially loading in a incomplete version of the dtb file.

cnlohr commented 1 year ago

How did this ever work?

Jcodefox commented 1 year ago

Did loading dtb files ever work?

cnlohr commented 1 year ago

I originally used it that way so I believe so. Though it does make me question how.

Jcodefox commented 1 year ago

188e199cf7873c7e8c20242bc77f947687078332 broke it

cnlohr commented 1 year ago

gotcha. Well thanks for catching it!