# | 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; |
– | Removed lines |
+ | Added lines |
< | Changed lines (old) |
> | Changed lines (new) |