Changeset 2:10c3bca620af
- Timestamp:
- 11/06/07 14:51:04 (3 years ago)
- Branch:
- default
- convert_revision:
- svn:7c786126-522e-0410-a822-d6d8feae56ca/trunk@51
- Files:
-
- 1 modified
-
src/game/g_client.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/game/g_client.c
r1 r2 78 78 void SP_info_human_intermission( gentity_t *ent ) 79 79 { 80 } 81 82 /* 83 =============== 84 G_CheckGUID 85 =============== 86 */ 87 qboolean G_ValidGUID(char *in) 88 { 89 int count = 0; 90 while( *in ) 91 { 92 count ++; 93 //check that the char is an alphanumeric one (with uppercased letter) 94 if( !((*in >= '0' && *in <= '9') || (*in >= 'A' && *in <= 'F')) ) 95 return qfalse; 96 97 in++; 98 } 99 100 if( count != 32 ) 101 return qfalse; 102 103 return qtrue; 80 104 } 81 105 … … 1252 1276 1253 1277 // add guid to session so we don't have to keep parsing userinfo everywhere 1254 if( ! guid[0])1278 if( !G_ValidGUID(guid) ) 1255 1279 { 1256 1280 Q_strncpyz( client->pers.guid, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
