Commit 9fadac40afc46f3044df72a29a85cf72d1a5a26d
Exists in
master
and in
13 other branches
Merge branch 'FER_11588' into amdadev
Showing
1 changed file
with
12 additions
and
2 deletions
Show diff stats
src/XMLRequest/XMLRequestParser.cc
@@ -176,7 +176,12 @@ public: | @@ -176,7 +176,12 @@ public: | ||
176 | if (lTTIndex) | 176 | if (lTTIndex) |
177 | { | 177 | { |
178 | //Add only interval designate by index | 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 | xmlFree(lTTIndex); | 186 | xmlFree(lTTIndex); |
182 | 187 | ||
@@ -262,7 +267,12 @@ public: | @@ -262,7 +267,12 @@ public: | ||
262 | if (lCatalogIndex) | 267 | if (lCatalogIndex) |
263 | { | 268 | { |
264 | //Add only interval designate by index | 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 | xmlFree(lCatalogIndex); | 277 | xmlFree(lCatalogIndex); |
268 | 278 |