summaryrefslogtreecommitdiff
path: root/AK/String.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-08 10:51:45 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-08 10:51:45 +0200
commita0ee2bad72a8b22500ace3b1d337ee9b6bb64725 (patch)
treec2e3b8817567df76a01e3e77a41ed854a01fdae5 /AK/String.cpp
parentf9089da2bcf5de2dfede98f29566be8e725bf376 (diff)
downloadserenity-a0ee2bad72a8b22500ace3b1d337ee9b6bb64725.zip
String: String::to_int() should fail for any empty string, not just null.
Diffstat (limited to 'AK/String.cpp')
-rw-r--r--AK/String.cpp2
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;
}