SDL input fixes

This commit is contained in:
Anuken
2019-07-29 15:17:10 -04:00
parent c678a5502d
commit 132d058098

View File

@@ -117,7 +117,7 @@ public class DesktopPlatform extends Platform{
String str = new String(Base64Coder.encode(result)); String str = new String(Base64Coder.encode(result));
if(str.equals("AAAAAAAAAOA=")) throw new RuntimeException("Bad UUID."); if(str.equals("AAAAAAAAAOA=") || str.equals("AAAAAAAAAAA=")) throw new RuntimeException("Bad UUID.");
return str; return str;
}catch(Exception e){ }catch(Exception e){
@@ -133,6 +133,6 @@ public class DesktopPlatform extends Platform{
if(bytes == null) return false; if(bytes == null) return false;
byte[] result = new byte[8]; byte[] result = new byte[8];
System.arraycopy(bytes, 0, result, 0, bytes.length); System.arraycopy(bytes, 0, result, 0, bytes.length);
return !new String(Base64Coder.encode(result)).equals("AAAAAAAAAOA="); return !new String(Base64Coder.encode(result)).equals("AAAAAAAAAOA=") && !new String(Base64Coder.encode(result)).equals("AAAAAAAAAAA=");
} }
} }