From 43a11f365e2f534d55d7ba53f9f2f260bf6a845a Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Wed, 6 Apr 2022 23:57:52 +0800 Subject: [PATCH] Fix wrong assertion --- src/replxx_impl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replxx_impl.cxx b/src/replxx_impl.cxx index 2b4193c..e9f332a 100644 --- a/src/replxx_impl.cxx +++ b/src/replxx_impl.cxx @@ -1858,7 +1858,7 @@ Replxx::ACTION_RESULT Replxx::ReplxxImpl::commit_line( char32_t ) { } int Replxx::ReplxxImpl::prev_newline_position( int pos_ ) const { - assert( ( pos_ >= 0 ) && ( pos_ <= _data.length() ) ); + assert( ( pos_ >= -1 ) && ( pos_ <= _data.length() ) ); if ( pos_ == _data.length() ) { -- pos_; }