diff --git a/terminaloverlay.cpp b/terminaloverlay.cpp index 358ef9e..44a2a7f 100644 --- a/terminaloverlay.cpp +++ b/terminaloverlay.cpp @@ -55,6 +55,11 @@ void CursorMove::apply( Framebuffer &fb ) const Validity ConditionalCursorMove::get_validity( const Framebuffer &fb ) const { + if ( (new_row >= fb.ds.get_height()) + || (new_col >= fb.ds.get_width()) ) { + return IncorrectOrExpired; + } + if ( timestamp() < expiration_time ) { return Pending; }