mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-02-10 10:21:15 +00:00
fix 'may be used uninitialized'
This commit is contained in:
parent
4a85ffff3a
commit
a1284302bb
1 changed files with 6 additions and 3 deletions
|
@ -56,10 +56,13 @@ qboolean CBspPortal::Build( char *def ){
|
||||||
char *c = def;
|
char *c = def;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
int dummy1, dummy2;
|
int dummy1, dummy2;
|
||||||
int res_cnt, i;
|
int i;
|
||||||
|
|
||||||
if ( portals.hint_flags ) {
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -67,7 +70,7 @@ qboolean CBspPortal::Build( char *def ){
|
||||||
hint = FALSE;
|
hint = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( point_count < 3 || ( portals.hint_flags && res_cnt < 4 ) ) {
|
if ( point_count < 3 ) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue