Browse Source

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/scm-ssi-hostage-v3

julien.clauter 9 years ago
parent
commit
abf985e762

BIN
res/drawable-hdpi/ic_action_discard.png


BIN
res/drawable-mdpi/ic_action_discard.png


BIN
res/drawable-xhdpi/ic_action_discard.png


BIN
res/drawable-xxhdpi/ic_action_discard.png


+ 4 - 4
src/de/tudarmstadt/informatik/hostage/commons/HelperUtils.java

@@ -409,10 +409,10 @@ public final class HelperUtils {
 		/*
 		FUCK YOU JAVA!!! WHY DON'T YOU HAVE UNSIGNED TYPES???
 		 */
-		long b0 = bytes[0]; if (b0 < 0) b0 = 255 + b0;
-		long b1 = bytes[1]; if (b1 < 0) b1 = 255 + b1;
-		long b2 = bytes[2]; if (b2 < 0) b2 = 255 + b2;
-		long b3 = bytes[3]; if (b3 < 0) b3 = 255 + b3;
+		long b0 = bytes[0]; if (b0 < 0) b0 = 256 + b0;
+		long b1 = bytes[1]; if (b1 < 0) b1 = 256 + b1;
+		long b2 = bytes[2]; if (b2 < 0) b2 = 256 + b2;
+		long b3 = bytes[3]; if (b3 < 0) b3 = 256 + b3;
 		long packed = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
 		if (packed >= (1l << 31)) {
 			packed -= (1l << 32) - 1l;