fix bug where pos could move to before the beginning of the file
authorJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 22 Mar 2001 23:56:07 +0000 (23:56 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 22 Mar 2001 23:56:07 +0000 (23:56 +0000)
src/libFLAC/file_decoder.c

index 80e96b7..54d4b23 100644 (file)
@@ -453,6 +453,8 @@ bool seek_to_absolute_sample_(FLAC__FileDecoder *decoder, long filesize, uint64
                        }
                        if(pos < l)
                                pos = l;
+                       if(pos < 0)
+                               pos = 0;
                        last_frame_sample = this_frame_sample;
                }
        }