Fix negative priority
authorMikael Berthe <mikael@lilotux.net>
Sat, 06 May 2006 00:00:46 +0200
changeset 842 f74c5c6d2c24
parent 841 f8c0447beec2
child 843 915a7f17474a
Fix negative priority Priority is an integer between -128 and +127.
mcabber/src/jabglue.c
--- a/mcabber/src/jabglue.c	Thu May 04 20:22:03 2006 +0200
+++ b/mcabber/src/jabglue.c	Sat May 06 00:00:46 2006 +0200
@@ -309,7 +309,7 @@
   prio = settings_opt_get_int("priority");
   if (prio) {
     char strprio[8];
-    snprintf(strprio, 8, "%u", prio);
+    snprintf(strprio, 8, "%d", (int)prio);
     xmlnode_insert_cdata(xmlnode_insert_tag(x, "priority"),
                          strprio, (unsigned) -1);
   }