From c36679fe13fc851d1e6f38d4dc6c83eb1344a0db Mon Sep 17 00:00:00 2001 From: Andy2 Date: Mon, 15 Nov 2010 18:21:40 -0800 Subject: [PATCH] init isDead to false. Fixes prolem where if DB entry's missing the value is uninitialized and so device gets warned that other device resigned even if none did. --- xwords4/relay/crefmgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwords4/relay/crefmgr.cpp b/xwords4/relay/crefmgr.cpp index 67e9ba89e..49b3de232 100644 --- a/xwords4/relay/crefmgr.cpp +++ b/xwords4/relay/crefmgr.cpp @@ -682,7 +682,7 @@ SafeCref::SafeCref( const char* connName, const char* cookie, HostID hid, CookieRef* cref; assert( hid <= 4 ); /* no more than 4 hosts */ - bool isDead; + bool isDead = false; cref = m_mgr->getMakeCookieRef( connName, cookie, hid, socket, nPlayersH, nPlayersS, gameSeed, langCode, wantsPublic || makePublic, &isDead ); @@ -700,7 +700,7 @@ SafeCref::SafeCref( const char* const connName ) , m_mgr( CRefMgr::Get() ) , m_isValid( false ) { - bool isDead; + bool isDead = false; CookieRef* cref = m_mgr->getMakeCookieRef( connName, &isDead ); if ( cref != NULL ) { m_locked = cref->Lock();