From 9f84c1524ec35af139ced5df841871fc300b166d Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 27 Aug 2020 12:25:57 -0400 Subject: [PATCH] cell_load_simple: need an ntole() #906 --- include/notcurses/notcurses.h | 2 +- src/lib/internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index f3e0763a7..8bac43e89 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -736,7 +736,7 @@ static inline int cell_load_simple(struct ncplane* n, cell* c, char ch){ cell_release(n, c); c->channels &= ~(CELL_WIDEASIAN_MASK | CELL_NOBACKGROUND_MASK); - c->gcluster = ch; + c->gcluster = ntole((uint32_t)ch); return 1; } diff --git a/src/lib/internal.h b/src/lib/internal.h index ee4306bbe..5c47da415 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -597,7 +597,7 @@ pool_release(egcpool* pool, cell* c){ // set the cell 'c' to point into the egcpool at location 'eoffset' static inline void set_gcluster_egc(cell* c, int eoffset){ - c->gcluster = htonl(0x01ul) + eoffset; + c->gcluster = ntole(0x01000000ul) + eoffset; } // Duplicate one cell onto another, possibly crossing ncplanes.