X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Ftext.cpp;h=ac9def1c5c62f47602c9e7512fc9f62a297df659;hb=48a3ac038467b55ed355d93b51e1c52923969864;hp=08a732cfb8ec2de38698f6368982fe48ace32a7b;hpb=edbae90db6fd9237515844afadb98f41a025ab1f;p=xestiacalendar%2F.git diff --git a/source/common/text.cpp b/source/common/text.cpp index 08a732c..ac9def1 100644 --- a/source/common/text.cpp +++ b/source/common/text.cpp @@ -14,18 +14,61 @@ multimap ProcessTextVectors(vector *TextProperties, int TextSeekCount = 0; int TextPropertySize = 0; int PropertySeekCount = 0; + string PropertyName = ""; + int PropertyNameSize = 0; + char BufferChar = 0; for (vector::iterator iter = TextProperties->begin(); iter != TextProperties->end(); iter++){ - - if (*iter == Property){ + + TextPropertySize = iter->size(); + + if (TextPropertySize == 0){ + + // Text property size is 0. Go to the next + // pair. + + continue; + + } + + // Get the property data up to the first semi-colon. + + while (TextSeekCount < TextPropertySize){ + + BufferChar = (*iter)[TextSeekCount]; + + if (BufferChar == ';'){ + break; + } + + PropertyName += BufferChar; + + TextSeekCount++; + + } + + if (*iter == Property || PropertyName == Property){ ProcessResult.insert(make_pair((*TextProperties)[PropertySeekCount], (*TextValues)[PropertySeekCount])); + // Check to continue if one is found. + + if (SearchMultiple == false){ + + // Found one, don't search for anymore. + + break; + + } + } PropertySeekCount++; + TextPropertySize = 0; + TextSeekCount = 0; + PropertyName.clear(); }