mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
Merge pull request #373 from Pan7/fixlwo2
Fix gcc warning i may be used uninitialized
This commit is contained in:
commit
d1e5cf4b65
1 changed files with 7 additions and 6 deletions
|
@ -384,16 +384,17 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
|
||||||
case ID_TFLG:
|
case ID_TFLG:
|
||||||
flags = getU2( fp );
|
flags = getU2( fp );
|
||||||
|
|
||||||
|
//only one of the three axis bits should be set
|
||||||
if ( flags & 1 ) {
|
if ( flags & 1 ) {
|
||||||
i = 0;
|
tex->axis = 0;
|
||||||
}
|
}
|
||||||
if ( flags & 2 ) {
|
else if ( flags & 2 ) {
|
||||||
i = 1;
|
tex->axis = 1;
|
||||||
}
|
}
|
||||||
if ( flags & 4 ) {
|
else if ( flags & 4 ) {
|
||||||
i = 2;
|
tex->axis = 2;
|
||||||
}
|
}
|
||||||
tex->axis = i;
|
|
||||||
if ( tex->type == ID_IMAP ) {
|
if ( tex->type == ID_IMAP ) {
|
||||||
tex->param.imap.axis = i;
|
tex->param.imap.axis = i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue