Merge pull request #24 from sdenel/patch-2

Update index.js
This commit is contained in:
Guy Halford-Thompson 2015-04-14 09:38:02 -07:00
commit 6fb90e522c

View File

@ -214,7 +214,7 @@ var intToBytes = function(num) {
*/
var hexToBytes = function(hex) {
var bytes = [];
for(var c = 0; c < hex.length; c += 2) {
for(var c = 0, C = hex.length; c < C; c += 2) {
bytes.push(parseInt(hex.substr(c, 2), 16));
}
return bytes;