Commit 1e064b75 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry

Fix _lookup_serial to compare with proper types.

Storing a serial number in a long and comparing it to an ogg_uint32_t only
 works if you cast the long down, instead of letting C promote it.

git-svn-id: 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 6af8828f
......@@ -194,7 +194,7 @@ static void _add_serialno(ogg_page *og,ogg_uint32_t **serialno_list, int *n){
/* returns nonzero if found */
static int _lookup_serialno(long s, ogg_uint32_t *serialno_list, int n){
static int _lookup_serialno(ogg_uint32_t s, ogg_uint32_t *serialno_list, int n){
if(*serialno_list == s) return 1;
......@@ -205,7 +205,7 @@ static int _lookup_serialno(long s, ogg_uint32_t *serialno_list, int n){
static int _lookup_page_serialno(ogg_page *og, ogg_uint32_t *serialno_list, int n){
long s = ogg_page_serialno(og);
ogg_uint32_t s = ogg_page_serialno(og);
return _lookup_serialno(s,serialno_list,n);
......@@ -246,12 +246,12 @@ static ogg_int64_t _get_prev_page_serial(OggVorbis_File *vf,
if(ret_serialno == *serialno){
if((ogg_uint32_t)ret_serialno == *serialno){
/* we fell off the end of the link, which means we seeked
back too far and shouldn't have been looking in that link
to begin with. If we found the preferred serial number,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment