libevtr: Fix loop properly
authorJohn Marino <draco@marino.st>
Tue, 10 Feb 2015 11:51:37 +0000 (12:51 +0100)
committerJohn Marino <draco@marino.st>
Tue, 10 Feb 2015 11:56:44 +0000 (12:56 +0100)
commit0ed590e196a01ead6e59d96891e47b7dece038fe
tree38b3af16fbf9d5e6af7e012d0bd5ff1dc62b688d
parent8cf7a7b1d5491c636f5b01597301597a32d40bc6
libevtr: Fix loop properly

The bruteforce fix should have used elements 0 - 2 because the strings
array was defined as EVTR_NS_MAX - 1, not EVTR_NS_MAX.  So the fix was
wrong, but it exposed the problem with the original code: the upper bound
of the loop was set to EVTR_NS_MAX, not EVTR_NS_MAX - 1 like the "maps"
version below it.

This commit reverts the previous change and fixes the problem with the
original code.

spotted-by: ivadasz
lib/libevtr/evtr.c