String: String::to_int() should fail for any empty string, not just null.

This commit is contained in:
Andreas Kling 2019-07-08 10:51:45 +02:00
parent f9089da2bc
commit a0ee2bad72
Notes: sideshowbarker 2024-07-19 13:22:34 +09:00

View file

@ -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;
}