Fix crash when /oper operator badpass. Fix comment explaining the
[ircu2.10.12-pk.git] / ircd / m_oper.c
index 3e561ebf32918dec8d68e76c35ce79f263a0757c..c820fe95907c2573194b3026fb903c7bb2e7d92b 100644 (file)
@@ -121,7 +121,7 @@ int oper_password_match(const char* to_match, const char* passwd)
      crypt_clear if it's enabled -- hikari */
   crypted = ircd_crypt(to_match, passwd);
 
-  if (to_match == NULL)
+  if (!crypted)
    return 0;
   res = strcmp(crypted, passwd);
   MyFree(crypted);