Decompile fn_11888 (UIBank_NewWnd::IsNumeric)
Batch #2061 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_11888 UIBank_NewWnd::IsNumeric: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
833db84d60
commit
e268d75977
1 changed files with 7 additions and 2 deletions
|
|
@ -295,11 +295,16 @@ long long UIBank_NewWnd::AdjustAmount(int amount) {
|
|||
// OFFSET: 0x008C4B00
|
||||
// FUNCTION: fn_11888
|
||||
bool UIBank_NewWnd::IsNumeric(std::string text) {
|
||||
for (unsigned char character : text) {
|
||||
if (static_cast<unsigned char>(character - '0') > 9) {
|
||||
if (text.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto it = text.begin(); it != text.end(); ++it) {
|
||||
if (static_cast<unsigned char>(*it - '0') > 9) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue