[mw-devel] MW3 r1336 - trunk/src
welshbyte at sucs.org
welshbyte at sucs.org
Sat May 25 19:23:53 BST 2013
Author: welshbyte
Date: 2013-05-25 19:23:53 +0100 (Sat, 25 May 2013)
New Revision: 1336
Modified:
trunk/src/perms.c
Log:
Fix show_fold_groups to avoid displaying garbage group strings
Modified: trunk/src/perms.c
===================================================================
--- trunk/src/perms.c 2013-05-23 08:34:30 UTC (rev 1335)
+++ trunk/src/perms.c 2013-05-25 18:23:53 UTC (rev 1336)
@@ -219,13 +219,14 @@
void show_fold_groups(char st, char *tmp, int flag)
{
+ int pos = 0;
int i;
for (i = 0; i < 8; i++)
if (st & (1<<i))
- tmp[i]='2'+i;
+ tmp[pos++]='1'+i;
else if (flag)
- tmp[i]='-';
- tmp[i]=0;
+ tmp[pos++]='-';
+ tmp[pos] = '\0';
}
extern struct person *user;
More information about the mw-devel
mailing list