synced with the ircu2.10.12.14 release
[ircu2.10.12-pk.git] / ircd / s_auth.c
index 405978eb1d3a55ea79ea20aefb46084250ad7b74..de5d64586de95ae303fb2cb799ac140b1bc6a4ca 100644 (file)
@@ -1052,7 +1052,7 @@ signed int auth_loc_query(struct AuthRequest *auth, const char *account, const c
 }
 
 /** Finishes a LOC request. */
-void auth_loc_reply(const char *numeric, const char *account, const char *fakehost, const char *flags[], signed int argc) {
+void auth_loc_reply(const char *numeric, const char *account, const char *fakehost, char *flags[], signed int argc) {
     char *timestamp;
     struct AuthRequest *auth;
 
@@ -2303,8 +2303,10 @@ static int iauth_cmd_done_account(struct IAuth *iauth, struct Client *cli,
   }
   /* If account has a creation timestamp, use it. */
   assert(cli_user(cli) != NULL);
-  if (params[0][len] == ':')
+  if (params[0][len] == ':') {
     cli_user(cli)->acc_create = strtoul(params[0] + len + 1, NULL, 10);
+    params[0][len] = '\0';
+  }
 
   /* Copy account name to User structure. */
   ircd_strncpy(cli_user(cli)->account, params[0], ACCOUNTLEN);