ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/conf.c (file contents):
Revision 6698 by michael, Thu Oct 29 13:08:59 2015 UTC vs.
Revision 6700 by michael, Thu Oct 29 13:12:04 2015 UTC

# Line 1095 | Line 1095 | oper_privs_as_string(const unsigned int
1095    static char privs_out[IRCD_BUFSIZE];
1096    char *privs_ptr = privs_out;
1097  
1098  *privs_ptr = '0';
1099
1098    for (const struct oper_privs *opriv = flag_list; opriv->flag; ++opriv)
1099      if (port & opriv->flag)
1100        *privs_ptr++ = opriv->c;
1101  
1102 +  if (privs_ptr == privs_out)
1103 +    *privs_ptr++ = '0';
1104 +
1105    *privs_ptr = '\0';
1106  
1107    return privs_out;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)