From a9f1281448a058bd31da47099687012a47834060 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 23 Feb 2014 22:42:51 +0100 Subject: [PATCH] modlist: Fix address display on 64-bit systems. --- include/messages.h | 2 +- src/modules.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/messages.h b/include/messages.h index 0b850d0a..207b12c4 100644 --- a/include/messages.h +++ b/include/messages.h @@ -202,7 +202,7 @@ #define NUMERIC_STR_670 ":STARTTLS successful, proceed with TLS handshake" #define NUMERIC_STR_671 "%s :is using a secure connection" #define NUMERIC_STR_691 ":%s" -#define NUMERIC_STR_702 ":%s 702 %s %s 0x%x %s %s" +#define NUMERIC_STR_702 ":%s 702 %s %s 0x%lx %s %s" #define NUMERIC_STR_703 ":%s 703 %s :End of /MODLIST." #define NUMERIC_STR_704 ":%s 704 %s %s :%s" #define NUMERIC_STR_705 ":%s 705 %s %s :%s" diff --git a/src/modules.c b/src/modules.c index 764a2c7a..692c14fa 100644 --- a/src/modules.c +++ b/src/modules.c @@ -458,7 +458,7 @@ mo_modlist(struct Client *client_p, struct Client *source_p, int parc, const cha sendto_one(source_p, form_str(RPL_MODLIST), me.name, source_p->name, modlist[i]->name, - modlist[i]->address, + (unsigned long)(uintptr_t)modlist[i]->address, modlist[i]->version, modlist[i]->core ? "(core)" : ""); } } @@ -466,7 +466,8 @@ mo_modlist(struct Client *client_p, struct Client *source_p, int parc, const cha { sendto_one(source_p, form_str(RPL_MODLIST), me.name, source_p->name, modlist[i]->name, - modlist[i]->address, modlist[i]->version, + (unsigned long)(uintptr_t)modlist[i]->address, + modlist[i]->version, modlist[i]->core ? "(core)" : ""); } }