[libromdata] ISOPrivate::host32(): Fix a typo that broke "Volume Size" on CD-i volumes.
Some checks are pending
Codecov / run (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run

Need to use be32_to_cpu() for 32-bit values, not be16_to_cpu().

This fixes a regression from commit 5cfce44312.
([libromdata] ISO: Always use host-endian except for CD-i, in which case, always use big-endian.)

Affects: v1.8 - v2.5

NOTE: v1.8 was the first version with CD-i support, so this was
effectively "always" broken.
This commit is contained in:
David Korth 2025-04-26 15:12:55 -04:00
parent 62ef8c18f4
commit 8d7f709f8b
2 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,8 @@
* KDE: On KF6, ListData widgets that didn't specify a default sorting
method ended up being sorted in reverse-order by default. Not sure
why this changed in Qt6. A workaround has been applied to fix it.
* ISO: Fix a typo that broke "Volume Size" on CD-i volumes.
* Affects: v1.8 - v2.5
* Other changes:
* Added support for localsearch-3.8, the new name of Tracker.

View File

@ -187,7 +187,7 @@ public:
*/
inline uint32_t host32(uint32_lsb_msb_t lm32) const
{
return (likely(discType != DiscType::CDi) ? lm32.he : be16_to_cpu(lm32.be));
return (likely(discType != DiscType::CDi) ? lm32.he : be32_to_cpu(lm32.be));
}
};