2016-09-13 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in 'lib/rdwavefile.cpp' that caused RDXL
	chunks to be written with odd chunk lengths.
This commit is contained in:
Fred Gleason 2016-09-13 08:29:33 -04:00
parent dff01de517
commit 23c9d6136e
2 changed files with 5 additions and 1 deletions

View File

@ -15475,3 +15475,6 @@
2016-09-11 Fred Gleason <fredg@paravelsystems.com>
* 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 <fredg@paravelsystems.com>
* Fixed a regression in 'lib/rdwavefile.cpp' that caused RDXL
chunks to be written with odd chunk lengths.

View File

@ -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;