Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App: Fix crash when the express number is too short #63

Merged
merged 2 commits into from Aug 22, 2018

Conversation

liuweiky
Copy link
Contributor

Some users may attempt to add an irregular number, which will lead to the crash as follows.

07-15 22:40:45.652 7322-7322/info.papdt.express.helper E/AndroidRuntime: FATAL EXCEPTION: main
    Process: info.papdt.express.helper, PID: 7322
    java.lang.StringIndexOutOfBoundsException: length=1; index=4
        at java.lang.String.substring(String.java:1971)
        at info.papdt.express.helper.ui.fragment.add.AddDialogFragment$createView$8.onClick(AddDialogFragment.kt:113)
        at android.view.View.performClick(View.java:6303)
        at android.view.View$PerformClick.run(View.java:24828)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6798)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

@fython fython merged commit bd8716d into fython:master Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants