Fix UUID generation on desktop (#203)

This commit is contained in:
iczero 2018-08-26 06:12:16 -07:00 committed by Anuken
parent 15378d3267
commit f5f0f02abe

View File

@ -135,7 +135,7 @@ public class DesktopPlatform extends Platform{
try{ try{
Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
NetworkInterface out; NetworkInterface out;
for(out = e.nextElement(); out.getHardwareAddress() == null && e.hasMoreElements() && validAddress(out.getHardwareAddress()); out = e.nextElement()) ; for(out = e.nextElement(); (out.getHardwareAddress() == null || !validAddress(out.getHardwareAddress())) && e.hasMoreElements(); out = e.nextElement()) ;
byte[] bytes = out.getHardwareAddress(); byte[] bytes = out.getHardwareAddress();
byte[] result = new byte[8]; byte[] result = new byte[8];