From 79fe48c62679e7097cd4cac1aacc6bfbb42ccb7e Mon Sep 17 00:00:00 2001 From: Rainer Clasen Date: Wed, 14 Mar 2012 17:14:03 +0100 Subject: [PATCH] SrmDevice: fixed marker offsets marker offsets were off by one. This could lead to bad indices when adding an "open" marker at the end of a recording. --- src/SrmDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SrmDevice.cpp b/src/SrmDevice.cpp index 052d5c0b9..f3790b798 100644 --- a/src/SrmDevice.cpp +++ b/src/SrmDevice.cpp @@ -445,7 +445,7 @@ SrmDevice::download( const QDir &tmpdir, /* finish previous marker */ if( mfirst >= 0 && ( ! is_int || is_first ) ) - if( ! srmio_data_add_marker( data, mfirst, data->cused -1, &serr ) ){ + if( ! srmio_data_add_marker( data, mfirst, data->cused -2, &serr ) ){ err = tr("adding marker failed: %1") .arg(serr.message); goto fail1; @@ -453,7 +453,7 @@ SrmDevice::download( const QDir &tmpdir, /* start marker */ if( is_first ){ - mfirst = (int)data->cused; + mfirst = (int)data->cused -1; } else if( ! is_int ){ mfirst = -1;