From 4b8ba75bd8dcf282f2265aa18c2968844e41686b Mon Sep 17 00:00:00 2001 From: David Cole <david.cole@kitware.com> Date: Thu, 10 Aug 2006 15:17:53 -0400 Subject: [PATCH] BUG: strlen logic was backwards resulting in function body never actually executing... when called with valid strings, it was always doing nothing and returning false... now it works as expected. --- SystemTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SystemTools.cxx b/SystemTools.cxx index 1899df4..eb1aadf 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -1764,7 +1764,7 @@ long int SystemTools::CreationTime(const char* filename) bool SystemTools::ConvertDateMacroString(const char *str, time_t *tmt) { - if (!str || !tmt || strlen(str) < 12) + if (!str || !tmt || strlen(str) > 11) { return false; } @@ -1812,7 +1812,7 @@ bool SystemTools::ConvertDateMacroString(const char *str, time_t *tmt) bool SystemTools::ConvertTimeStampMacroString(const char *str, time_t *tmt) { - if (!str || !tmt || strlen(str) < 27) + if (!str || !tmt || strlen(str) > 26) { return false; } -- GitLab