mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-27 12:00:51 +00:00
Make sure psf_open_rsrc() returns SFE_NO_ERROR when it should.
This commit is contained in:
parent
b935e188f3
commit
4958f78317
@ -134,12 +134,9 @@ psf_open_rsrc (SF_PRIVATE *psf, int open_mode)
|
||||
fname [0] = '.' ;
|
||||
fname [1] = '_' ;
|
||||
|
||||
psf->error = SFE_NO_ERROR ;
|
||||
if ((psf->rsrcdes = psf_open_fd (psf->rsrcpath, open_mode)) >= 0)
|
||||
{ psf->rsrclength = psf_get_filelen_fd (psf->rsrcdes) ;
|
||||
if (psf->rsrclength < 100)
|
||||
{ psf->error = SFE_SD2_BAD_RSRC ;
|
||||
return psf->error ;
|
||||
} ;
|
||||
return SFE_NO_ERROR ;
|
||||
} ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user