Use Buffer.equals not Buffer.compare for node 4+

This commit is contained in:
Nick O'Leary 2016-04-01 10:23:00 +01:00
parent b1896e3737
commit 7cb9b2da66
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ function compareObjects(obj1,obj2) {
if (isBuffer1 && isBuffer2) {
if (Buffer.compare) {
// For node 4.x+ - use the native compare
return Buffer.compare(obj1,obj2);
return Buffer.equals(obj1,obj2);
} else {
if (obj1.length !== obj2.length) {
return false;