diff options
Diffstat (limited to 'src/plugins/stats/functions.c')
-rw-r--r-- | src/plugins/stats/functions.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index 846dd67b..16330efd 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -458,8 +458,9 @@ static int statsProcessor(const char * optName, | |||
458 | last = 0; | 458 | last = 0; |
459 | j = last; | 459 | j = last; |
460 | found = -1; | 460 | found = -1; |
461 | if (0 == strcmp(optName, | 461 | if ( (j < lsv_size) && |
462 | lastStatValues[j].statName)) | 462 | (0 == strcmp(optName, |
463 | lastStatValues[j].statName)) ) | ||
463 | found = j; | 464 | found = j; |
464 | if (found == -1) { | 465 | if (found == -1) { |
465 | for (j=0;j<lsv_size;j++) { | 466 | for (j=0;j<lsv_size;j++) { |