diff --git a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java index 3dd2d70b..537c80d0 100644 --- a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java @@ -188,7 +188,7 @@ public class LoginActivity extends BaseActivity { if(loginType == LoginType.BASIC) { - int loginOTP = Integer.parseInt(otpCode.getText().toString().trim()); + int loginOTP = (otpCode.getText().toString().length() == 6) ? Integer.parseInt(otpCode.getText().toString().trim()) : 0; if(rawInstanceUrl.getUserInfo() != null) {