[ox/preloader] Fix SizeCather::pad
This commit is contained in:
parent
86c33019fe
commit
5bac497293
7
deps/ox/src/ox/preloader/sizecatcher.hpp
vendored
7
deps/ox/src/ox/preloader/sizecatcher.hpp
vendored
@ -87,8 +87,11 @@ constexpr ox::Error SizeCatcher<PlatSpec>::field(const char*, const T **val, std
|
||||
|
||||
template<typename PlatSpec>
|
||||
constexpr void SizeCatcher<PlatSpec>::pad(const auto *val) noexcept {
|
||||
const auto padding = m_size - m_size % alignOf<PlatSpec>(*val);
|
||||
m_size += padding;
|
||||
const auto a = alignOf<PlatSpec>(*val);
|
||||
const auto excess = m_size % a;
|
||||
if (excess) {
|
||||
m_size += a - excess;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename PlatSpec, typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user