summaryrefslogtreecommitdiff
path: root/AK/PrintfImplementation.h
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-03-07 15:05:33 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-21 09:35:23 +0100
commit60caffb113e6327c1d66b012088a6f67c85b7b70 (patch)
treebe763c7c7ca8d7338f943aef882f2c2442f39bc2 /AK/PrintfImplementation.h
parentf673f08bec207dcb4028d0d4f7dd5cca5c357ef2 (diff)
downloadserenity-60caffb113e6327c1d66b012088a6f67c85b7b70.zip
AK+LibC: Make %p specifier Architecture Independent
We were using u32 as a pointer representation and not FlatPtr
Diffstat (limited to 'AK/PrintfImplementation.h')
-rw-r--r--AK/PrintfImplementation.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/PrintfImplementation.h b/AK/PrintfImplementation.h
index 92dc9681ee..dce6a20110 100644
--- a/AK/PrintfImplementation.h
+++ b/AK/PrintfImplementation.h
@@ -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
{