The following commit has been merged in the master branch:
commit e28d54d2e5acd17b8cfbf73901814591630e5f52
Author: Andrei Zavada <[email protected]>
Date:   Fri Apr 19 13:35:49 2013 +0300

    edf.cc: don't read last annotation twice

diff --git a/ChangeLog b/ChangeLog
index 7d754c9..bc295e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ v.0.9 (2013-xx-xx)
        * Remove Subject Info dialog; use edfhed to change EDF header.
        * Only plot finite profile values on msmt overview.
        * Proper file size checks in CEDFFile ctor.
+       * Don't read last sidecar annotation twice.
 
 v.0.8.2 (2013-04-07)
        * Fix GtkScrolledWindow issue in Annotations dialog.
diff --git a/src/libsigfile/edf.cc b/src/libsigfile/edf.cc
index 0468982..11b2fdb 100644
--- a/src/libsigfile/edf.cc
+++ b/src/libsigfile/edf.cc
@@ -210,10 +210,10 @@ CEDFFile (const string& fname_, int flags_)
                        ifstream fd (make_fname_annotations( H.label));
                        if ( not fd.good() )
                                continue;
-                       int type = -1;
-                       double aa = NAN, az = NAN;
-                       string an;
                        while ( fd.good() and not fd.eof() ) {
+                               int type = -1;
+                               double aa = NAN, az = NAN;
+                               string an;
                                fd >> type >> aa >> az;
                                getline( fd, an, EOA);
                                if ( isfinite(aa) and isfinite(az) and

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to