Fix gcc warning shdr may be used uninitialized

This commit is contained in:
Pan7 2016-08-22 10:41:34 +02:00
parent 282f33d813
commit d089ba9454
1 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,8 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
goto Fail;
}
shdr = NULL;
/* process subchunks as they're encountered */
while ( 1 ) {
@ -494,6 +496,9 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
break;
case ID_SDAT:
if ( !shdr ) {
goto Fail;
}
shdr->data = getbytes( fp, sz );
break;