Fix display with %hu format.
authorMichael Poole <mdpoole@troilus.org>
Thu, 16 Feb 2006 03:30:00 +0000 (03:30 +0000)
committerMichael Poole <mdpoole@troilus.org>
Thu, 16 Feb 2006 03:30:00 +0000 (03:30 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1619 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/ircd_snprintf.c

index 5427e8da433e4edcfec2272065a90ade6186eb0d..0067eb666e284eb303deefacc92bdd820057777d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-15  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/ircd_snprintf.c (doprintf): Fix typecast for %hu.
+
 2006-02-15  Michael Poole <mdpoole@troilus.org>
 
        * include/ircd_signal.h (SigChldCallBack): New typedef.
index 42f0e1054900a164016e72344406e6bacf1a4b97..60fdb44f44d1c0d56cdba26ab83a3c365ddcb1e0 100644 (file)
@@ -1805,7 +1805,7 @@ doprintf(struct Client *dest, struct BufData *buf_p, const char *fmt,
        if (fld_s.flags & TYPE_CHAR) /* eg, %hhu */
          fld_s.value.v_int = (unsigned char)va_arg(vp, unsigned int);
        else if (fld_s.flags & TYPE_SHORT) /* eg, %hu */
-         fld_s.value.v_int = (short)va_arg(vp, unsigned int);
+         fld_s.value.v_int = (unsigned short)va_arg(vp, unsigned int);
        else if (fld_s.flags & TYPE_QUAD) /* eg, %qu */
          fld_s.value.v_int = va_arg(vp, uint64_t);
        else if (fld_s.flags & TYPE_LONG) /* eg, %lu */