From: Steve Brokenshire Date: Sun, 17 Jan 2016 11:20:03 +0000 (+0000) Subject: Added check on the results of both ValidBaseObject and ValidObject X-Git-Tag: release-0.02~770 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=982b9393ccd85901f5edbb406526360962ac63d5;p=xestiacalendar%2F.git Added check on the results of both ValidBaseObject and ValidObject --- 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; }