diff -Naur --exclude Makefile --exclude info wfdb-10.5.0/doc/wpg-src/wpg0.tex wfdb-10.5.1/doc/wpg-src/wpg0.tex --- wfdb-10.5.0/doc/wpg-src/wpg0.tex 2010-03-17 13:15:52.000000000 -0400 +++ wfdb-10.5.1/doc/wpg-src/wpg0.tex 2010-03-19 23:57:18.000000000 -0400 @@ -8881,6 +8881,13 @@ changes that may not be described here. @unnumberedsec WFDB 10.5 +@unnumberedsubsec Changes in version 10.5.1 (19 March 2010) + +In version 10.5.0, signals in formats 80 and 160 with amplitudes of 0 were +incorrectly treated as invalid by @code{getframe()} and @code{getvec()}. +Thanks to Isaac Henry for reporting this problem, which has been corrected in +@file{lib/signal.c}. + @unnumberedsubsec Changes in version 10.5.0 (16 March 2010) The WFDB library now supports signals with 24 and 32 bits of precision, using diff -Naur --exclude Makefile --exclude info wfdb-10.5.0/lib/signal.c wfdb-10.5.1/lib/signal.c --- wfdb-10.5.0/lib/signal.c 2010-03-13 12:27:33.000000000 -0500 +++ wfdb-10.5.1/lib/signal.c 2010-03-19 23:48:50.000000000 -0400 @@ -1745,14 +1745,14 @@ break; case 80: /* 8-bit offset binary amplitudes */ *vector = v = r80(ig); - if (v == 0) + if (v == -1 << 7) *vector = gvpad ? is->samp : WFDB_INVALID_SAMPLE; else is->samp = *vector; break; case 160: /* 16-bit offset binary amplitudes */ *vector = v = r160(ig); - if (v == 0) + if (v == -1 << 15) *vector = gvpad ? is->samp : WFDB_INVALID_SAMPLE; else is->samp = *vector; diff -Naur --exclude Makefile --exclude info wfdb-10.5.0/lib/wfdb.h wfdb-10.5.1/lib/wfdb.h --- wfdb-10.5.0/lib/wfdb.h 2010-03-17 14:28:39.000000000 -0400 +++ wfdb-10.5.1/lib/wfdb.h 2010-03-19 23:58:10.000000000 -0400 @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 5 -#define WFDB_RELEASE 0 +#define WFDB_RELEASE 1 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ #define WFDB_NETFILES_LIBCURL 1 diff -Naur --exclude Makefile --exclude info wfdb-10.5.0/NEWS wfdb-10.5.1/NEWS --- wfdb-10.5.0/NEWS 2010-03-17 15:36:00.000000000 -0400 +++ wfdb-10.5.1/NEWS 2010-03-20 00:31:43.000000000 -0400 @@ -1,3 +1,9 @@ +10.5.1 (19 March 2010): + In version 10.5.0, signals in formats 80 and 160 with amplitudes of 0 + were incorrectly treated as invalid by getframe() and getvec(). Thanks + to Isaac Henry for reporting this problem, which has been corrected in + signal.c. + 10.5.0 (16 March 2010): The WFDB library now supports signals with 24 and 32 bits of precision, using new formats 24 and 32, and WFDB applications 'wrsamp' and 'xform'