changeset 1217:21226969d59a

Make the entity id a smaller string
author Mikael Berthe <mikael@lilotux.net>
date Tue, 08 May 2007 11:04:32 +0200
parents 8645b5166040
children ab5de2ed2b7e
files mcabber/src/jab_iq.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/jab_iq.c	Tue May 08 10:14:57 2007 +0200
+++ b/mcabber/src/jab_iq.c	Tue May 08 11:04:32 2007 +0200
@@ -130,7 +130,7 @@
   if (!ver) {
     unsigned int n;
     srand(time(NULL));
-    n = (1U + (unsigned int)rand()) >> 8;
+    n = (unsigned int)(10.0 + 6.0 * rand() / (RAND_MAX + 1.0));
     ver = g_strdup_printf("%s~%x", tver, n);
     g_free(tver);
   }