mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
don't call egc_rtl() on negative bytes
This commit is contained in:
parent
0cba073cc9
commit
ea18be772a
@ -983,11 +983,9 @@ pool_blit_direct(egcpool* pool, cell* c, const char* gcluster, int bytes, int co
|
|||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
pool_load_direct(egcpool* pool, cell* c, const char* gcluster, int bytes, int cols){
|
pool_load_direct(egcpool* pool, cell* c, const char* gcluster, int bytes, int cols){
|
||||||
if(bytes <= 1){
|
char* rtl = NULL;
|
||||||
c->channels &= ~(CELL_WIDEASIAN_MASK | CELL_NOBACKGROUND_MASK);
|
if(cols < 2){
|
||||||
}else if(cols < 2){
|
|
||||||
c->channels &= ~CELL_WIDEASIAN_MASK;
|
c->channels &= ~CELL_WIDEASIAN_MASK;
|
||||||
// FIXME also shaded blocks! ░ etc. are there combined EGCs involving these?
|
|
||||||
if(bytes == 3 && memcmp(gcluster, "\xe2\x96\x88", 4) == 0){
|
if(bytes == 3 && memcmp(gcluster, "\xe2\x96\x88", 4) == 0){
|
||||||
c->channels |= CELL_NOBACKGROUND_MASK;
|
c->channels |= CELL_NOBACKGROUND_MASK;
|
||||||
}else{
|
}else{
|
||||||
@ -997,7 +995,9 @@ pool_load_direct(egcpool* pool, cell* c, const char* gcluster, int bytes, int co
|
|||||||
c->channels |= CELL_WIDEASIAN_MASK;
|
c->channels |= CELL_WIDEASIAN_MASK;
|
||||||
c->channels &= ~CELL_NOBACKGROUND_MASK;
|
c->channels &= ~CELL_NOBACKGROUND_MASK;
|
||||||
}
|
}
|
||||||
char* rtl = egc_rtl(gcluster, &bytes); // checks for RTL and adds U+200E if so
|
if(bytes >= 0){
|
||||||
|
rtl = egc_rtl(gcluster, &bytes); // checks for RTL and adds U+200E if so
|
||||||
|
}
|
||||||
if(rtl){
|
if(rtl){
|
||||||
gcluster = rtl;
|
gcluster = rtl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user