Browse Source

Be less 'greedy' copying CartChunk Cut ID data.

QStrings, like C strings end with "0", so
stop when reaching the first instance of 0.

Signed-off-by: David Klann <dklann@broadcasttool.com>
pull/637/head
David Klann 2 years ago
parent
commit
d0ab62a5bf
No known key found for this signature in database GPG Key ID: 66DC59FBEDF670D8
  1. 3
      AUTHORS
  2. 3
      ChangeLog
  3. 1
      lib/rdwavefile.cpp

3
AUTHORS

@ -54,3 +54,6 @@ Chris Smowton
Scott Spillers <scotts@paravelsystems.com>
The original Icon set
David Klann <dklann@broadcasttool.com>
Some small bug fixes

3
ChangeLog

@ -20702,3 +20702,6 @@
2020-12-24 Fred Gleason <fredg@paravelsystems.com>
* Modified the schema map in rddbmgr(8) to position schema update
347 as part of v3.6.x.
2021-01-17 David Klann <dklann@broadcasttool.com>
* Fixed bug in lib/rdwavefile.cpp that copied CartChunk Cut ID
past the end of the first "NULL" character.

1
lib/rdwavefile.cpp

@ -4644,6 +4644,7 @@ QString RDWaveFile::cutString(char *buffer,unsigned start_point,unsigned size)
QString string;
for(unsigned i=start_point;i<start_point+size;i++) {
if(!(buffer[i])) break;
string=string.append(buffer[i]);
}

Loading…
Cancel
Save