mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
utf8_etc_len: flatten wcwidth negative returns
This commit is contained in:
parent
858d1662eb
commit
f0962fc6b5
@ -84,9 +84,11 @@ utf8_egc_len(const char* gcluster, int* colcount){
|
||||
if(*colcount){ // this must be starting a new EGC, exit and do not claim
|
||||
break;
|
||||
}
|
||||
if(cols < 0 && iswspace(wc)){ // newline or tab
|
||||
if(cols < 0){
|
||||
if(iswspace(wc)){ // newline or tab
|
||||
return ret + 1;
|
||||
}
|
||||
cols = 0;
|
||||
return ret + 1;
|
||||
}
|
||||
*colcount += cols;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user