# HG changeset patch # User Mikael Berthe # Date 1134668558 -3600 # Node ID 89f5672eb5238f56e5ccfee2b36bded6ab941735 # Parent cf722bff65792efc59fdbe001175ecf800e11d01 /move: really strip trailing space, and assign to no group if no group is specified diff -r cf722bff6579 -r 89f5672eb523 mcabber/src/commands.c --- a/mcabber/src/commands.c Thu Dec 15 18:29:14 2005 +0100 +++ b/mcabber/src/commands.c Thu Dec 15 18:42:38 2005 +0100 @@ -1019,14 +1019,14 @@ newgroupname = g_strdup(arg); // Remove trailing space for (p = newgroupname; *p; p++) ; - while (p > newgroupname && *p == ' ') *p = 0; + while (p > newgroupname && *p == ' ') *p-- = 0; strip_arg_special_chars(newgroupname); // Call to buddy_setgroup() should be at the end, as current implementation // clones the buddy and deletes the old one (and thus, jid and name are // freed) - jb_updatebuddy(jid, name, newgroupname); + jb_updatebuddy(jid, name, *newgroupname ? newgroupname : NULL); scr_RosterUp(); buddy_setgroup(bud, newgroupname);