From 78a8aff0f4c833f57b24cf4b656b067f98761e9c Mon Sep 17 00:00:00 2001 From: Tim Windelschmidt Date: Tue, 27 Sep 2016 21:54:49 +0200 Subject: [PATCH] Missed the -1 --- node/snmp-mac.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/snmp-mac.js b/node/snmp-mac.js index 4268a48..17b8795 100644 --- a/node/snmp-mac.js +++ b/node/snmp-mac.js @@ -62,12 +62,12 @@ var SnmpMac = function(hostname, community) { // console.log(mac); redisClient.get(redisprefix + mac, function(err, reply) { if(reply != null) { - if (reply.split('')[0] == '"' && reply.split('')[reply.split('').length] == '"') { + if (reply.split('')[0] == '"' && reply.split('')[reply.split('').length -1] == '"') { var name = ""; for (var i = 1; i < reply.split('').length - 1; i++){ name += reply.split('')[i] } - names.push() + names.push(name) } else { names.push(reply); }