From 9ec12c9550596321c6c20b6e49d10be7cfc60f9d Mon Sep 17 00:00:00 2001 From: David Oliveros Date: Mon, 4 Jul 2016 23:38:48 -0500 Subject: [PATCH] Fixed hash matching algorithm --- package.json | 2 +- passhash.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a76c374..8d915c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ths", - "version": "2.1.5", + "version": "2.1.6", "description": "A module that lets you start a Tor instance, use bridges and create Tor hidden services from node.js", "main": "index.js", "scripts": { diff --git a/passhash.js b/passhash.js index d07988b..c73137b 100644 --- a/passhash.js +++ b/passhash.js @@ -25,7 +25,7 @@ module.exports = function(length, callback, cmd){ torProcess.on('close', function(){ output = output.split('\n'); var hash; - for (var i = output.length - 1; i > 0; i--){ + for (var i = output.length - 1; i >= 0; i--){ if (output[i] && output[i] != ""){ hash = output[i]; break;