From 44a56b8a1f3c8c6d177a347bd8a31cecfbec887f Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 7 Jan 2019 08:06:10 -0600 Subject: [PATCH] BinaryField: fix issue with negate --- phpseclib/Math/BinaryField/Integer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Math/BinaryField/Integer.php b/phpseclib/Math/BinaryField/Integer.php index 1faf15b5..9de2786b 100644 --- a/phpseclib/Math/BinaryField/Integer.php +++ b/phpseclib/Math/BinaryField/Integer.php @@ -444,7 +444,7 @@ class Integer extends Base { $x = str_pad($this->value, strlen(static::$modulo[$this->instanceID]), "\0", STR_PAD_LEFT); - return new static($x ^ static::$modulo[$this->instanceID]); + return new static($this->instanceID, $x ^ static::$modulo[$this->instanceID]); } /**