diff --git a/ChangeLog b/ChangeLog index c72fd4bf..9d640062 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15929,3 +15929,6 @@ 'rlm_filewrite' RLM from 256 to 8192 characters. 2017-08-07 Fred Gleason * Incremented the package version to 2.16.0int06_rfa02. +2017-08-16 Fred Gleason + * Fixed a bug in 'lib/rdlog.cpp' that caused incorrect results when + calculating the total number of voice tracks in a log. diff --git a/lib/rdlog.cpp b/lib/rdlog.cpp index 8b6874c7..824b6c20 100644 --- a/lib/rdlog.cpp +++ b/lib/rdlog.cpp @@ -394,8 +394,10 @@ void RDLog::updateTracks() unsigned scheduled=0; unsigned completed=0; - sql=QString().sprintf("select NUMBER from CART where OWNER=\"%s\"", - (const char *)RDEscapeString(log_name)); + sql=QString("select `")+RDLog::tableName(log_name)+"`.ID from "+ + "`"+RDLog::tableName(log_name)+"` left join CART "+ + "on `"+RDLog::tableName(log_name)+"`.CART_NUMBER=CART.NUMBER where "+ + "CART.OWNER is not null"; q=new RDSqlQuery(sql); completed=q->size(); delete q;