-
Notifications
You must be signed in to change notification settings - Fork 56
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
Blank field user types character crash #18
Comments
Hi, I found the same issue, I create a fix in BKCurrencyTextField.m in line 67, Its a workaround, but solve my problem.
|
Terminate block |
Disable / terminate code |
If you have a blank BKCurrencyTextField and you try and type or paste a letter character rather than a number character it crashes the app.
Here's the error:
2016-03-16 15:34:32.494 Alder[68142:1267089] *** Terminating app due to uncaught exception 'NSDecimalNumberOverflowException', reason: 'NSDecimalNumber overflow exception'
0 CoreFoundation 0x0000000107d54e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001077cddeb objc_exception_throw + 48
2 CoreFoundation 0x0000000107d54d9d +[NSException raise:format:] + 205
3 Foundation 0x000000010747db48 -[NSDecimalNumberHandler exceptionDuringOperation:error:leftOperand:rightOperand:] + 193
4 Foundation 0x000000010747c976 _checkErrorAndRound + 65
5 Foundation 0x000000010747cd46 -[NSDecimalNumber decimalNumberByDividingBy:withBehavior:] + 159
6 BKMoneyKit 0x00000001062e06ba -[BKCurrencyTextField textField:shouldChangeCharactersInRange:replacementString:] + 1370
The text was updated successfully, but these errors were encountered: