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 80e96b714a528e853b7ea07827b8d6f3e93d16f5..54d4b233396eb062fcabd87c820de7a436f5c139 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;
                }
        }