Eek, a bug!
authorKen Raeburn <raeburn@cygnus>
Tue, 23 Mar 1993 20:11:25 +0000 (20:11 +0000)
committerKen Raeburn <raeburn@cygnus>
Tue, 23 Mar 1993 20:11:25 +0000 (20:11 +0000)
Position 0 means no-movement for SEEK_CUR ... not for SEEK_SET.

bfd/libbfd.c

index 8665b238ec2804c104a96990ab902ac7b4351bf8..75ce90e4324e2c38b6dd01907da57a5fea53ee0a 100644 (file)
@@ -263,7 +263,7 @@ DEFUN(bfd_seek,(abfd, position, direction),
 
   BFD_ASSERT (direction == SEEK_SET || direction == SEEK_CUR);
 
-  if (direction == SEEK_SET && position == 0)
+  if (direction == SEEK_CUR && position == 0)
     return 0;
 #ifdef FILE_OFFSET_IS_CHAR_INDEX
   if (direction == SEEK_SET && position == abfd->where)