summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r--libs/ardour/region.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 2193a69908..508f09a480 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -957,14 +957,14 @@ Region::adjust_to_sync (nframes_t pos)
// cerr << "adjusting pos = " << pos << " to sync at " << _sync_position << " offset = " << offset << " with dir = " << sync_dir << endl;
if (sync_dir > 0) {
- if (max_frames - pos > offset) {
+ if (pos > offset) {
pos -= offset;
+ } else {
+ pos = 0;
}
} else {
- if (pos > offset) {
+ if (max_frames - pos > offset) {
pos += offset;
- } else {
- pos = 0;
}
}