Commit abfabdf4bd60bf6dd5fa84d885ce0eeaa3d0f852

Authored by Erdogan Furkan
1 parent 3ce80cc2

#11588 - Kernel part

Showing 1 changed file with 12 additions and 2 deletions   Show diff stats
src/XMLRequest/XMLRequestParser.cc
... ... @@ -176,7 +176,12 @@ public:
176 176 if (lTTIndex)
177 177 {
178 178 //Add only interval designate by index
179   - size_t index = atoi( (const char*)lTTIndex );
  179 + int tmpIndex = atoi( (const char*)lTTIndex );
  180 + size_t index;
  181 + if(tmpIndex == -1)
  182 + index = lTimeIntervalList.size() -1;
  183 + else
  184 + index = (size_t)tmpIndex;
180 185  
181 186 xmlFree(lTTIndex);
182 187  
... ... @@ -262,7 +267,12 @@ public:
262 267 if (lCatalogIndex)
263 268 {
264 269 //Add only interval designate by index
265   - size_t index = atoi( (const char*)lCatalogIndex );
  270 + int tmpIndex = atoi( (const char*)lCatalogIndex );
  271 + size_t index;
  272 + if(tmpIndex == -1)
  273 + index = lTimeIntervalList.size() -1;
  274 + else
  275 + index = (size_t)tmpIndex;
266 276  
267 277 xmlFree(lCatalogIndex);
268 278  
... ...