From eb44b1e0a044f924c8cbcf28da320aab602d0aca Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 23 Sep 2012 11:56:58 +0200 Subject: [PATCH] ethstat plugin: Fix off-by-one error. This hopefully fixes Github issue #135. --- src/ethstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ethstat.c b/src/ethstat.c index ae1b6893..746fc613 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -104,7 +104,7 @@ static int ethstat_add_map (const oconfig_item_t *ci) /* {{{ */ memset (map, 0, sizeof (*map)); sstrncpy (map->type, ci->values[1].value.string, sizeof (map->type)); - if (ci->values_num == 2) + if (ci->values_num == 3) sstrncpy (map->type_instance, ci->values[2].value.string, sizeof (map->type_instance)); -- 2.30.2