mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-09 13:58:44 -06:00
Only print as many hex characters as the type is long
This commit is contained in:
@@ -153,7 +153,7 @@ namespace hex::lang {
|
||||
u64 data = 0;
|
||||
provider->read(this->getOffset(), &data, this->getSize());
|
||||
|
||||
this->createDefaultEntry(hex::format("%lu (0x%08lx)", data, data));
|
||||
this->createDefaultEntry(hex::format("%lu (0x%0*lx)", data, , this->getSize() * 2, data));
|
||||
}
|
||||
|
||||
std::string getTypeName() override {
|
||||
@@ -178,7 +178,7 @@ namespace hex::lang {
|
||||
|
||||
s64 signedData = signedData = hex::signExtend(data, this->getSize(), 64);
|
||||
|
||||
this->createDefaultEntry(hex::format("%ld (0x%08lx)", signedData, data));
|
||||
this->createDefaultEntry(hex::format("%ld (0x%0*lx)", signedData, this->getSize() * 2, data));
|
||||
}
|
||||
|
||||
std::string getTypeName() override {
|
||||
@@ -209,7 +209,7 @@ namespace hex::lang {
|
||||
formatData = data;
|
||||
}
|
||||
|
||||
this->createDefaultEntry(hex::format("%f (0x%08lx)", formatData, formatData));
|
||||
this->createDefaultEntry(hex::format("%f (0x%0*lx)", formatData, this->getSize() * 2, formatData));
|
||||
}
|
||||
|
||||
std::string getTypeName() override {
|
||||
|
||||
Reference in New Issue
Block a user