From 623b1619dfecf2eecb332034c2fa51c13c96c6c8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 20 May 2014 18:01:35 -0400 Subject: [PATCH] Dates - Converted atoi to strtol, and added the missing include. --- src/Dates.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Dates.cpp b/src/Dates.cpp index c3d89ee72..6d22421ad 100644 --- a/src/Dates.cpp +++ b/src/Dates.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -391,12 +392,12 @@ bool namedDates (const std::string& name, Variant& value) if (isdigit (name[1])) { - number = atoi (name.substr (0, 2).c_str ()); + number = strtol (name.substr (0, 2).c_str (), NULL, 10); ordinal = lowerCase (name.substr (2)); } else { - number = atoi (name.substr (0, 2).c_str ()); + number = strtol (name.substr (0, 2).c_str (), NULL, 10); ordinal = lowerCase (name.substr (1)); }