sndfile.c : Fixed a login bug in sf_seek().

This commit is contained in:
Erik de Castro Lopo 2006-06-20 13:04:05 +00:00
parent f5020b8440
commit 12633db1bf
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,9 @@
Fix a windows bug where the syserr string of SF_PRIVATE was not being set
correctly.
* src/sndfile.c
Fixed a logic bug in sf_seek(). Thanks to Paul Davis for finding this.
2006-06-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* configure.ac

View File

@ -1149,7 +1149,7 @@ sf_seek (SNDFILE *sndfile, sf_count_t offset, int whence)
** it makes sense.
*/
if (((whence & SFM_MASK) == SFM_WRITE && psf->mode == SFM_READ) ||
((whence & SFM_MASK) == SFM_WRITE && psf->mode == SFM_WRITE))
((whence & SFM_MASK) == SFM_READ && psf->mode == SFM_WRITE))
{ psf->error = SFE_WRONG_SEEK ;
return PSF_SEEK_ERROR ;
} ;