From 982b9393ccd85901f5edbb406526360962ac63d5 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 17 Jan 2016 11:20:03 +0000 Subject: [PATCH] Added check on the results of both ValidBaseObject and ValidObject --- source/objects/calendarobject/CalendarObject.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/objects/calendarobject/CalendarObject.cpp b/source/objects/calendarobject/CalendarObject.cpp index e63d9d8..6ed8acd 100644 --- a/source/objects/calendarobject/CalendarObject.cpp +++ b/source/objects/calendarobject/CalendarObject.cpp @@ -144,6 +144,17 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *LoadStringData) CalendarObjectValidResult BaseDataResult = ValidBaseObject(); CalendarObjectValidResult EventDataResult = ValidObject(); + if (BaseDataResult != CALENDAROBJECTVALID_OK || + EventDataResult != CALENDAROBJECTVALID_OK){ + + StringProcResult = CALENDAROBJECTLOAD_INVALIDFORMAT; + + } else { + + StringProcResult = CALENDAROBJECTLOAD_OK; + + } + return StringProcResult; } -- 2.39.5