From 23c9d6136eb1368c8eb4b175f1f19b8057bcbbbb Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 13 Sep 2016 08:29:33 -0400 Subject: [PATCH] 2016-09-13 Fred Gleason * Fixed a regression in 'lib/rdwavefile.cpp' that caused RDXL chunks to be written with odd chunk lengths. --- ChangeLog | 3 +++ lib/rdwavefile.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a276b194..682cda37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15475,3 +15475,6 @@ 2016-09-11 Fred Gleason * Fixed a bug in 'rdadmin/createdb.cpp' that caused obsolete fields in the 'SERVICES' table to be included when creating a new database. +2016-09-13 Fred Gleason + * Fixed a regression in 'lib/rdwavefile.cpp' that caused RDXL + chunks to be written with odd chunk lengths. diff --git a/lib/rdwavefile.cpp b/lib/rdwavefile.cpp index 25febd39..0df50dcd 100644 --- a/lib/rdwavefile.cpp +++ b/lib/rdwavefile.cpp @@ -2156,7 +2156,7 @@ void RDWaveFile::setRdxlContents(const QString &xml) // Make sure that the RDXL chunk is of even length. // (To avoid goosing a bug in CoolEdit Pro 2003). // - if((rdxl_contents.length()%2)!=2) { + if((rdxl_contents.length()%2)!=0) { rdxl_contents+=" "; } } @@ -2478,6 +2478,7 @@ void RDWaveFile::WriteChunk(int fd,const char *cname,unsigned char *buf, void RDWaveFile::WriteChunk(int fd,const char *cname,const QString &contents) { + syslog(LOG_NOTICE,"writing %s: %d",cname,contents.length()); unsigned char size_buf[4]; size_buf[0]=contents.length()&0xff; size_buf[1]=(contents.length()>>8)&0xff;