mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-16 16:30:26 +02:00
2025-03-07 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDCart::updateLength()' that could cause SQL errors. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
1e11090ce5
commit
ea2e9dec40
@ -24959,3 +24959,6 @@
|
|||||||
errors.
|
errors.
|
||||||
2025-02-28 Fred Gleason <fredg@paravelsystems.com>
|
2025-02-28 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Incremented the package version to 4.3.0int7.
|
* Incremented the package version to 4.3.0int7.
|
||||||
|
2025-03-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in 'RDCart::updateLength()' that could cause SQL
|
||||||
|
errors.
|
||||||
|
@ -1118,11 +1118,16 @@ void RDCart::updateLength(bool enforce_length,unsigned length)
|
|||||||
segue_total+=(q->value(1).toInt()-q->value(3).toInt()) * weight;
|
segue_total+=(q->value(1).toInt()-q->value(3).toInt()) * weight;
|
||||||
}
|
}
|
||||||
hook_total+=(q->value(14).toUInt()-q->value(13).toUInt()) * weight;
|
hook_total+=(q->value(14).toUInt()-q->value(13).toUInt()) * weight;
|
||||||
if(min_talk_len>q->value(18).toUInt()-q->value(17).toUInt()) {
|
if((q->value(17).toInt()>=0)&&(q->value(18).toInt()>=0)) {
|
||||||
min_talk_len=q->value(18).toUInt()-q->value(17).toUInt();
|
int talk_len=q->value(18).toInt()-q->value(17).toInt();
|
||||||
}
|
if(talk_len>=0) {
|
||||||
if(max_talk_len<q->value(18).toUInt()-q->value(17).toUInt()) {
|
if(min_talk_len>talk_len) {
|
||||||
max_talk_len=q->value(18).toUInt()-q->value(17).toUInt();
|
min_talk_len=talk_len;
|
||||||
|
}
|
||||||
|
if(max_talk_len<talk_len) {
|
||||||
|
max_talk_len=talk_len;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
weight_total += weight;
|
weight_total += weight;
|
||||||
}
|
}
|
||||||
@ -1142,13 +1147,12 @@ void RDCart::updateLength(bool enforce_length,unsigned length)
|
|||||||
setForcedLength(0);
|
setForcedLength(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// FIXME: CART.MINIMUM_TALK_LENGTH is an unsigned int in the DB, yet we
|
|
||||||
// sometime try to assign -1. Why?
|
|
||||||
//
|
|
||||||
if((min_talk_len<0)||(min_talk_len==LLONG_MAX)) {
|
if((min_talk_len<0)||(min_talk_len==LLONG_MAX)) {
|
||||||
min_talk_len=0;
|
min_talk_len=0;
|
||||||
}
|
}
|
||||||
|
if((max_talk_len<0)||(max_talk_len==LLONG_MAX)) {
|
||||||
|
max_talk_len=0;
|
||||||
|
}
|
||||||
setMinimumTalkLength(min_talk_len);
|
setMinimumTalkLength(min_talk_len);
|
||||||
setMaximumTalkLength(max_talk_len);
|
setMaximumTalkLength(max_talk_len);
|
||||||
setCutQuantity(q->size());
|
setCutQuantity(q->size());
|
||||||
|
0
utils/rddbmgr/analyze.cpp
Normal file
0
utils/rddbmgr/analyze.cpp
Normal file
Loading…
x
Reference in New Issue
Block a user