Skip to content

Commit

Permalink
Merge pull request #373 from Pan7/fixlwo2
Browse files Browse the repository at this point in the history
Fix gcc warning i may be used uninitialized
  • Loading branch information
TTimo committed Jan 1, 2017
2 parents a6d1007 + c346d43 commit d1e5cf4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libs/picomodel/lwo/lwob.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,16 +384,17 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
case ID_TFLG:
flags = getU2( fp );

//only one of the three axis bits should be set
if ( flags & 1 ) {
i = 0;
tex->axis = 0;
}
if ( flags & 2 ) {
i = 1;
else if ( flags & 2 ) {
tex->axis = 1;
}
if ( flags & 4 ) {
i = 2;
else if ( flags & 4 ) {
tex->axis = 2;
}
tex->axis = i;

if ( tex->type == ID_IMAP ) {
tex->param.imap.axis = i;
}
Expand Down

0 comments on commit d1e5cf4

Please sign in to comment.