From 42da9b1ebf9c2152d24d9835cce539e19817a678 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 28 Dec 2019 09:43:01 -0800 Subject: [PATCH] don't allow devid of 0 --- .../app/src/main/java/org/eehouse/android/xw4/DevID.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java index ac36e8936..6d291112b 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java @@ -154,7 +154,7 @@ public class DevID { synchronized ( sNFCDevID ) { if ( 0 == sNFCDevID[0] ) { int devid = DBUtils.getIntFor( context, NFC_DEVID_KEY, 0 ); - if ( 0 == devid ) { + while ( 0 == devid ) { devid = Utils.nextRandomInt(); DBUtils.setIntFor( context, NFC_DEVID_KEY, devid ); }