AK+LibC: Make %p specifier Architecture Independent

We were using u32 as a pointer representation and not FlatPtr
This commit is contained in:
Hendiadyoin1 2021-03-07 15:05:33 +01:00 committed by Andreas Kling
parent f673f08bec
commit 60caffb113
Notes: sideshowbarker 2024-07-18 21:13:11 +09:00

View file

@ -373,11 +373,11 @@ struct PrintfImpl {
}
ALWAYS_INLINE int format_p(const ModifierState&, ArgumentListRefT ap) const
{
return print_hex(m_putch, m_bufptr, NextArgument<u32>()(ap), false, true, false, true, 8);
return print_hex(m_putch, m_bufptr, NextArgument<FlatPtr>()(ap), false, true, false, true, 8);
}
ALWAYS_INLINE int format_P(const ModifierState&, ArgumentListRefT ap) const
{
return print_hex(m_putch, m_bufptr, NextArgument<u32>()(ap), true, true, false, true, 8);
return print_hex(m_putch, m_bufptr, NextArgument<FlatPtr>()(ap), true, true, false, true, 8);
}
ALWAYS_INLINE int format_percent(const ModifierState&, ArgumentListRefT) const
{