From af8904796900a904852448db059c6bc83b4f43c6 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 7 Nov 2012 22:03:58 -0800 Subject: [PATCH] treat an empty devID string as TYPE_NONE regardless of what the client claims. --- xwords4/relay/xwrelay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xwords4/relay/xwrelay.cpp b/xwords4/relay/xwrelay.cpp index 87c44badb..3105992f7 100644 --- a/xwords4/relay/xwrelay.cpp +++ b/xwords4/relay/xwrelay.cpp @@ -385,8 +385,10 @@ processConnect( unsigned char* bufp, int bufLen, int socket, in_addr& addr ) unsigned char devIDType = 0; if ( getNetByte( &bufp, end, &devIDType ) && 0 != devIDType ) { - getNetString( &bufp, end, devID.m_devIDString ); - devID.m_devIDType = (DevIDType)devIDType; + if ( getNetString( &bufp, end, devID.m_devIDString ) + && 0 < devID.m_devIDString.length() ) { + devID.m_devIDType = (DevIDType)devIDType; + } } }