From a0ee2bad72a8b22500ace3b1d337ee9b6bb64725 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 8 Jul 2019 10:51:45 +0200 Subject: String: String::to_int() should fail for any empty string, not just null. --- AK/String.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3