pool_load_direct: zilch out entirety of gcluster #906

pull/966/head
nick black 4 years ago
parent 383c36415d
commit 3fbdab3020
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -899,8 +899,8 @@ pool_load_direct(egcpool* pool, cell* c, const char* gcluster, int bytes, int co
assert(cols < 2);
pool_release(pool, c);
c->channels &= ~(CELL_WIDEASIAN_MASK | CELL_NOBACKGROUND_MASK);
c->gcluster = 0;
((unsigned char*)&c->gcluster)[0] = *gcluster;
((unsigned char*)&c->gcluster)[1] = 0;
return bytes;
}
// FIXME also shaded blocks! ░ etc. are there combined EGCs involving these?

@ -64,10 +64,10 @@ TEST_CASE("Palette256") {
// write it to an ncplane, and verify attributes via reflection
SUBCASE("PutCAttrs") {
cell c = CELL_TRIVIAL_INITIALIZER;
cell_load_simple(n_, &c, 'X');
CHECK(1 == cell_load_simple(n_, &c, 'X'));
CHECK(0 == cell_set_fg_palindex(&c, 0x20));
CHECK(0 == cell_set_bg_palindex(&c, 0x40));
CHECK(0 < ncplane_putc_yx(n_, 0, 0, &c));
CHECK(1 == ncplane_putc_yx(n_, 0, 0, &c));
cell_release(n_, &c);
cell r = CELL_TRIVIAL_INITIALIZER;
CHECK(0 < ncplane_at_yx_cell(n_, 0, 0, &r));

Loading…
Cancel
Save