diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-08 10:51:45 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-08 10:51:45 +0200 |
commit | a0ee2bad72a8b22500ace3b1d337ee9b6bb64725 (patch) | |
tree | c2e3b8817567df76a01e3e77a41ed854a01fdae5 | |
parent | f9089da2bcf5de2dfede98f29566be8e725bf376 (diff) | |
download | serenity-a0ee2bad72a8b22500ace3b1d337ee9b6bb64725.zip |
String: String::to_int() should fail for any empty string, not just null.
-rw-r--r-- | AK/String.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/String.cpp b/AK/String.cpp index 54c7fd742f..4657835b8d 100644 --- a/AK/String.cpp +++ b/AK/String.cpp @@ -133,7 +133,7 @@ int String::to_int(bool& ok) const int value = 0; int i = 0; - if (is_null()) { + if (is_empty()) { ok = false; return 0; } |