diff -Naur vdr-1.5.8.org/recording.c vdr-1.5.8/recording.c --- vdr-1.5.8.org/recording.c 2007-10-01 09:01:10.030274841 -0400 +++ vdr-1.5.8/recording.c 2007-10-01 16:11:50.533471369 -0400 @@ -1330,7 +1330,7 @@ int d = Forward ? 1 : -1; for (;;) { Index += d; - if (Index >= 0 && (Forward || Index>=fIndex ) && Index < last - ((Forward && StayOffEnd) ? INDEXSAFETYLIMIT : 0)) { + if (index > 0 && (Forward || Index>=fIndex ) && Index < last - ((Forward && StayOffEnd) ? INDEXSAFETYLIMIT : 0)) { if (index[Index].type == I_FRAME) { if (FileNumber) *FileNumber = index[Index].number; @@ -1390,7 +1390,7 @@ Index--; } Index--; - } while ((Index>=0) && (!offs[index[Index].number] || index[Index].offset < offs[index[Index].number] || (unsigned) index[Index].offset > (unsigned) (offs[index[Index].number] + MAXFRAMESIZE))); + } while ((Index>0) && (!offs[index[Index].number] || index[Index].offset < offs[index[Index].number] || (unsigned) index[Index].offset > (unsigned) (offs[index[Index].number] + MAXFRAMESIZE))); return oldFirst=Index+1; }