summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mixlib/xmix_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mixlib/xmix_device.c b/mixlib/xmix_device.c
index 0c07549..8d4084c 100644
--- a/mixlib/xmix_device.c
+++ b/mixlib/xmix_device.c
@@ -155,7 +155,7 @@ ioc_ (mix_device_t *dev, mix_short_t arg)
if (dev->type >= mix_dev_TAPE_0 && dev->type <= mix_dev_TAPE_7)
{
- if (m == 0) rewind (file);
+ if (m == 0 || (ftell (file) + m <= 0 )) rewind (file);
else fseek (file, m, SEEK_CUR);
}
if (dev->type >= mix_dev_DISK_0 && dev->type <= mix_dev_DISK_7)