mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
fbcon_draw: properly guard against lower boundary #2032
This commit is contained in:
parent
a23e91e258
commit
21952acd29
@ -75,7 +75,7 @@ relies on the font. Patches to correct/complete this table are very welcome!
|
||||
| [Guake](https://github.com/Guake/guake) | | ? |? | | |
|
||||
| [ITerm2](https://github.com/gnachman/iTerm2) | ✅ | ✅ |✅ |`TERM=xterm-256color` ||
|
||||
| [Kitty](https://github.com/kovidgoyal/kitty) | ✅ | ✅ |✅ |`TERM=xterm-kitty` | See below. |
|
||||
| [kmscon](https://github.com/dvdhrm/kmscon) | | ❌ | ❌ |`TERM=xterm-256color` | No RGB color AFAICT, nor any distinct terminfo entry. No actual `ccc` implementation. |
|
||||
| [kmscon](https://github.com/dvdhrm/kmscon) | | ❌ | ❌ |`TERM=xterm-256color` | No RGB color AFAICT, nor any distinct terminfo entry. No actual `ccc` implementation. Sets `COLORTERM=kmscon`.|
|
||||
| [Konsole](https://invent.kde.org/utilities/konsole) | ❌ | ❌ |? |`TERM=konsole-direct` | |
|
||||
| Linux console | ❌ | ✅ |see [below](#the-linux-console) |`TERM=linux` `COLORTERM=24bit` | 8 (512 glyph fonts) or 16 (256 glyph fonts) colors max, but RGB values are downsampled to a 256-index palette. See below. |
|
||||
| [mlterm](https://github.com/arakiken/mlterm) | ✅ | ❌ |? |`TERM=mlterm-256color` | Do not set `COLORTERM`. `mlterm-direct` gives strange results. |
|
||||
|
@ -173,7 +173,7 @@ int fbcon_draw(const tinfo* ti, const struct ncpile *p, sprixel* s, fbuf* f, int
|
||||
(void)p;
|
||||
(void)f; // we don't write to the stream
|
||||
int wrote = 0;
|
||||
for(unsigned l = 0 ; l < (unsigned)s->pixy && l < ti->pixy ; ++l){
|
||||
for(unsigned l = 0 ; l < (unsigned)s->pixy && l + y * ti->cellpixy < ti->pixy ; ++l){
|
||||
// FIXME pixel size isn't necessarily 4B, line isn't necessarily psize*pixx
|
||||
size_t offset = ((l + y * ti->cellpixy) * ti->pixx + x * ti->cellpixx) * 4;
|
||||
uint8_t* tl = ti->linux_fbuffer + offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user