mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 21:44:36 +03:00
RichString: implement safe rewind
The current rewind logic causes issues when rewinding over the short string optimization boundary.
This commit is contained in:

committed by
cgzones

parent
08ac22ddb9
commit
b9adc30b86
@ -46,6 +46,10 @@ static void RichString_setLen(RichString* this, int len) {
|
||||
}
|
||||
}
|
||||
|
||||
void RichString_rewind(RichString* this, int count) {
|
||||
RichString_setLen(this, this->chlen - count);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
|
||||
static inline int RichString_writeFromWide(RichString* this, int attrs, const char* data_c, int from, int len) {
|
||||
|
Reference in New Issue
Block a user