From abfe84eb5cfb784eddd4d8b53d269a19e8f8a628 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Fri, 17 Nov 2017 22:48:03 +1100 Subject: [PATCH] Use correct formats / types in snprintf() calls in tcl.c --- source/tcl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tcl.c b/source/tcl.c index 987e731..1ee31bd 100644 --- a/source/tcl.c +++ b/source/tcl.c @@ -145,7 +145,7 @@ int i; { DCC_int *n; n = (DCC_int *)s->info; - snprintf(buff, sizeof buff, "%d %s", n->dccnum, s->server); + snprintf(buff, sizeof buff, "%u %s", n->dccnum, s->server); Tcl_AppendElement(irp, buff); count++; } @@ -174,7 +174,7 @@ int count = 0; if ((s->flags & DCC_TYPES) == DCC_CHAT) { n = (DCC_int *) s->info; - snprintf(buff, sizeof buff, "%d %s", n->dccnum, s->server); + snprintf(buff, sizeof buff, "%u %s", n->dccnum, s->server); Tcl_AppendElement(irp, buff); count++; } @@ -1141,7 +1141,7 @@ int tcl_unixtime STDVAR BADARGS(1,1,""); - snprintf(s, sizeof s, "%lu", now); + snprintf(s, sizeof s, "%lu", (unsigned long)now); Tcl_AppendResult(irp,s,NULL); return TCL_OK; }