mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
String: String::to_int() should fail for any empty string, not just null.
This commit is contained in:
parent
f9089da2bc
commit
a0ee2bad72
Notes:
sideshowbarker
2024-07-19 13:22:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a0ee2bad72a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue