Use more correct loop point correction

This commit is contained in:
Zachary Hall 2024-10-16 08:52:42 -07:00
parent b695192f34
commit d5d9ca8ce5
2 changed files with 3 additions and 7 deletions

1
.gitignore vendored
View file

@ -20,3 +20,4 @@ cmake-build-*/
.ctagsd .ctagsd
*.rej *.rej
.codelite/*.tags .codelite/*.tags
*_build

View file

@ -60,13 +60,8 @@ void ZsmBackend::load(const char *filename) {
ZsmCommand cmd = get_command(); ZsmCommand cmd = get_command();
size_t cur_pos = file->get_pos(); size_t cur_pos = file->get_pos();
if (cur_pos >= this->loop_point && this->loop_pos < 0) { if (cur_pos >= this->loop_point && this->loop_pos < 0) {
if (cur_pos > this->loop_point) { loop_pos = time;
this->loop_point = prev_pos; this->loop_point = cur_pos;
loop_pos = prev_time;
} else {
loop_pos = time;
this->loop_point = cur_pos;
}
} }
if (cmd.id == ZsmEOF) { if (cmd.id == ZsmEOF) {
break; break;