summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/ocl/tproc/detail/rope_fwd.inl8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ocl/tproc/detail/rope_fwd.inl b/include/ocl/tproc/detail/rope_fwd.inl
index fededbc..7973252 100644
--- a/include/ocl/tproc/detail/rope_fwd.inl
+++ b/include/ocl/tproc/detail/rope_fwd.inl
@@ -617,9 +617,9 @@ namespace ocl::tproc
basic_rope<CharT, Traits, Allocator>::rope_ptr basic_rope<CharT, Traits, Allocator>::operator++(int n)
{
rope_ptr ret{};
- while (n)
+ while (n && ret)
{
- ret = this->operator++();
+ ret = ret->operator++();
--n;
}
@@ -636,9 +636,9 @@ namespace ocl::tproc
basic_rope<CharT, Traits, Allocator>::rope_ptr basic_rope<CharT, Traits, Allocator>::operator--(int n)
{
rope_ptr ret{};
- while (n)
+ while (n && ret)
{
- ret = this->operator--();
+ ret = ret->operator--();
--n;
}