diff --git a/lib/textParsers.js b/lib/textParsers.js index bbb0df7e..0a584015 100644 --- a/lib/textParsers.js +++ b/lib/textParsers.js @@ -119,9 +119,9 @@ var parseInterval = function(val) { }; var parseByteA = function(val) { - if(val.match(/^\\x/)){ + if(/^\\x/.test(val)){ // new 'hex' style response (pg >9.0) - return new Buffer(val.replace(/^\\x/,''), 'hex'); + return new Buffer(val.substr(2), 'hex'); }else{ out = "" i = 0