Fix string comparison when parsing otpauth URI

develop
Damien Goutte-Gattat 7 years ago
parent e8f14aeaa4
commit 5d019e0a52
  1. 2
      src/otpauth.c

@ -293,7 +293,7 @@ otp_parse_uri(const char *uri)
otp->type = OTP_TYPE_TOTP;
otp->period = 30;
}
else if ( strncmp(p, "hotp", 5) == 0 && (p += 5) ) {
else if ( strncmp(p, "hotp/", 5) == 0 && (p += 5) ) {
otp->type = OTP_TYPE_HOTP;
otp->counter = 0;
}

Loading…
Cancel
Save