[bugfix] isCursorAtEnd returned NO when textfield is empty, causing cursor location and range to be  a weird number. In ios6, the number field crashed when cleared all numbers.
[bugfix] isCursorAtEnd returned NO when textfield
is empty, causing cursor location and range to be 
a weird number.
In ios6, the number field crashed when cleared all
numbers.
webpay/webpay-token-ios,StreetAcademy/webpay-token-ios