From 837bdb65a20de240f92ea57727385352e06b977e Mon Sep 17 00:00:00 2001 From: Andrea Barisani Date: Tue, 12 Apr 2022 14:51:26 +0200 Subject: [PATCH] fix display bug when -l and -e little are combined (highlighted in https://github.com/usbarmory/crucible/issues/9) --- cmd/crucible/crucible.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/crucible/crucible.go b/cmd/crucible/crucible.go index 5102e59..f822dcb 100644 --- a/cmd/crucible/crucible.go +++ b/cmd/crucible/crucible.go @@ -260,6 +260,10 @@ func read(tag string, f *fusemap.FuseMap, name string) (err error) { fmt.Println(value) } else if conf.list { if reg, ok := f.Registers[name]; ok { + if conf.endianness == "little" { + res = util.SwitchEndianness(res) + } + log.Println() log.Print(reg.BitMap(res)) }