Index: Source/platform/DateComponents.cpp |
diff --git a/Source/platform/DateComponents.cpp b/Source/platform/DateComponents.cpp |
index 62f9033dae42a2c584bd5d4223be16ba187ad4d5..a781e1c7de86715c1d754d439a7f6bd196fee523 100644 |
--- a/Source/platform/DateComponents.cpp |
+++ b/Source/platform/DateComponents.cpp |
@@ -100,7 +100,7 @@ static unsigned countDigits(const String& src, unsigned start) |
// Very strict integer parser. Do not allow leading or trailing whitespace unlike charactersToIntStrict(). |
static bool toInt(const String& src, unsigned parseStart, unsigned parseLength, int& out) |
{ |
- if (parseStart + parseLength > src.length() || parseLength <= 0) |
+ if (parseStart + parseLength > src.length() || !parseLength) |
return false; |
int value = 0; |
unsigned current = parseStart; |