From 7cb9b2da66de158b6517a3715bd454e5859ecce5 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 1 Apr 2016 10:23:00 +0100 Subject: [PATCH] Use Buffer.equals not Buffer.compare for node 4+ --- red/runtime/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/red/runtime/util.js b/red/runtime/util.js index 8c51f2cda..c73745e02 100644 --- a/red/runtime/util.js +++ b/red/runtime/util.js @@ -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;