mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-11 08:22:52 +00:00
Fix miscellaneous bugs identified by Claude
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,9 @@ void CDChanger::init() {
|
||||
}
|
||||
|
||||
void CDChanger::handle(const Frame *in, Frame *out) {
|
||||
if (in->length < 4)
|
||||
return; // [Currently known] valid CDChanger frames have at least 4 bytes
|
||||
|
||||
const uint8_t *data = &in->data[1];
|
||||
const auto from = static_cast<Device>(*data++);
|
||||
/* const auto to = */ data++;
|
||||
@@ -184,7 +187,7 @@ void CDChanger::handle(const Frame *in, Frame *out) {
|
||||
case Track_Fast_Forward: {
|
||||
state |= SEEKING;
|
||||
secs += TIME_SKIP;
|
||||
if (secs > 60) {
|
||||
if (secs > 59) {
|
||||
secs -= 60;
|
||||
++mins;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user