From: <fr...@us...> - 2016-08-14 00:03:14
|
Revision: 5732 http://sourceforge.net/p/fuse-emulator/code/5732 Author: fredm Date: 2016-08-14 00:03:12 +0000 (Sun, 14 Aug 2016) Log Message: ----------- Use libspectrum_bits_to_bytes(). Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/pzx_read.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-08-12 13:18:42 UTC (rev 5731) +++ trunk/libspectrum/hacking/ChangeLog 2016-08-14 00:03:12 UTC (rev 5732) @@ -1108,3 +1108,4 @@ 20160812 internals.h,pzx_read.c,tzx_write.c,utilities.c: fix writing GDB blocks with no pilot tones and add support for converting PZX data blocks with asymmetric pulses to TZX files (Fred). +20160814 pzx_read.c: use libspectrum_bits_to_bytes() (Fred). Modified: trunk/libspectrum/pzx_read.c =================================================================== --- trunk/libspectrum/pzx_read.c 2016-08-12 13:18:42 UTC (rev 5731) +++ trunk/libspectrum/pzx_read.c 2016-08-14 00:03:12 UTC (rev 5732) @@ -26,7 +26,6 @@ #include <config.h> -#include <math.h> #include <stddef.h> #include <stdio.h> #include <string.h> @@ -258,7 +257,7 @@ count = libspectrum_read_dword( buffer ); initial_level = !!(count & 0x80000000); count &= 0x7fffffff; - count_bytes = ceil( count / (double)LIBSPECTRUM_BITS_IN_BYTE ); + count_bytes = libspectrum_bits_to_bytes( count ); bits_in_last_byte = count % LIBSPECTRUM_BITS_IN_BYTE ? count % LIBSPECTRUM_BITS_IN_BYTE : LIBSPECTRUM_BITS_IN_BYTE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |