diff --git a/aegisub/src/command/video.cpp b/aegisub/src/command/video.cpp index f49aad6bc..103a4eaec 100644 --- a/aegisub/src/command/video.cpp +++ b/aegisub/src/command/video.cpp @@ -383,7 +383,7 @@ struct video_frame_next_keyframe : public validator_video_loaded { std::vector const& kf = c->videoController->GetKeyFrames(); std::vector::const_iterator pos = lower_bound(kf.begin(), kf.end(), c->videoController->GetFrameN() + 1); - c->videoController->JumpToFrame(pos == kf.end() ? c->videoController->GetFrameN() - 1 : *pos); + c->videoController->JumpToFrame(pos == kf.end() ? c->videoController->GetLength() - 1 : *pos); } };