fix 'may be used uninitialized'

This commit is contained in:
Timothee Besset 2017-02-25 15:04:31 -06:00
parent 4a85ffff3a
commit a1284302bb

View file

@ -56,10 +56,13 @@ qboolean CBspPortal::Build( char *def ){
char *c = def;
unsigned int n;
int dummy1, dummy2;
int res_cnt, i;
int i;
if ( portals.hint_flags ) {
res_cnt = sscanf( def, "%u %d %d %d", &point_count, &dummy1, &dummy2, (int *)&hint );
int res_cnt = sscanf( def, "%u %d %d %d", &point_count, &dummy1, &dummy2, (int *)&hint );
if ( res_cnt < 4 ) {
return FALSE;
}
}
else
{
@ -67,7 +70,7 @@ qboolean CBspPortal::Build( char *def ){
hint = FALSE;
}
if ( point_count < 3 || ( portals.hint_flags && res_cnt < 4 ) ) {
if ( point_count < 3 ) {
return FALSE;
}