Skip to content
This repository was archived by the owner on Jan 25, 2018. It is now read-only.

Commit a2ec464

Browse files
committed
Merge pull request #730 from eighthave/master
fix SMP error and hebrew/indonesian translations
2 parents bdd8bca + 66bfcbe commit a2ec464

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

res/values-he

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
values-iw

res/values-id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
values-in

src/net/java/otr4j/crypto/SM.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ public static BigInteger[] unserialize(byte[] bytes) throws SMException {
183183
* element
184184
*/
185185
public static boolean checkGroupElem(BigInteger g) {
186-
return !(g.compareTo(BigInteger.valueOf(2)) > 0 && g.compareTo(SM.MODULUS_MINUS_2) < 0);
186+
return g.compareTo(BigInteger.valueOf(2)) < 0 || g.compareTo(SM.MODULUS_MINUS_2) > 0;
187187
}
188188

189189
/**
190190
* Check that an BigInteger is in the right range to be a (non-zero)
191191
* exponent
192192
*/
193193
public static boolean checkExpon(BigInteger x) {
194-
return !(x.compareTo(BigInteger.ONE) > 0 && x.compareTo(SM.ORDER_S) <= 0);
194+
return x.compareTo(BigInteger.ONE) < 0 || x.compareTo(SM.ORDER_S) >= 0;
195195
}
196196

197197
/**

0 commit comments

Comments
 (0)