2
0
Эх сурвалжийг харах

TouchTrigger: resolve issue #1448 (assertion failure in touchHash())

Stephen Gold 4 жил өмнө
parent
commit
33059285fe

+ 3 - 4
jme3-core/src/main/java/com/jme3/input/controls/TouchTrigger.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -58,9 +58,8 @@ public class TouchTrigger implements Trigger {
     }
 
     public static int touchHash(int keyCode) {
-        assert keyCode >= 0 && keyCode <= 255 :
-                "unexpected keyCode: " + keyCode;
-        return 0xfedcba98 + keyCode;
+        int result = 0xfedcba98 + keyCode;
+        return result;
     }
 
     @Override