mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
assert enum within range
This commit is contained in:
parent
9981360c67
commit
9ad28908bb
2 changed files with 3 additions and 0 deletions
|
@ -2316,6 +2316,7 @@ putDevID( const CommsCtxt* comms, XWStreamCtxt* stream )
|
|||
# if XWRELAY_PROTO_VERSION >= XWRELAY_PROTO_VERSION_CLIENTID
|
||||
DevIDType typ;
|
||||
const XP_UCHAR* devID = util_getDevID( comms->util, &typ );
|
||||
XP_ASSERT( ID_TYPE_NONE <= typ && typ < ID_TYPE_NTYPES );
|
||||
stream_putU8( stream, typ );
|
||||
if ( ID_TYPE_NONE != typ ) {
|
||||
stream_catString( stream, devID );
|
||||
|
|
|
@ -110,6 +110,8 @@ typedef enum {
|
|||
,ID_TYPE_RELAY /* assigned by relay as replacement for one of the below */
|
||||
,ID_TYPE_LINUX
|
||||
,ID_TYPE_ANDROID_GCM
|
||||
|
||||
,ID_TYPE_NTYPES
|
||||
} DevIDType;
|
||||
|
||||
#ifndef CANT_DO_TYPEDEF
|
||||
|
|
Loading…
Add table
Reference in a new issue