diff --git a/src/demo/mojibake.c b/src/demo/mojibake.c index fb7c47951..f2a0dbbc7 100644 --- a/src/demo/mojibake.c +++ b/src/demo/mojibake.c @@ -3528,8 +3528,8 @@ makegroup(struct ncplane* title, int y, const char* emoji, const char* name){ if(bytes < 0){ break; } -fprintf(stderr, "PLACING %d/%d: %zu [%s]\n", y, x, strlen(cell_extended_gcluster(n, &c)), cell_extended_gcluster(n, &c)); int w = ncplane_putc_yx(n, y, x, &c); +//fprintf(stderr, "PLACED %d/%d (%d): %zu [%s]\n", y, x, w, strlen(cell_extended_gcluster(n, &c)), cell_extended_gcluster(n, &c)); cell_release(n, &c); if(w < 0){ ncplane_destroy(n); diff --git a/src/lib/egcpool.h b/src/lib/egcpool.h index 429503d15..298e6ddc4 100644 --- a/src/lib/egcpool.h +++ b/src/lib/egcpool.h @@ -88,7 +88,8 @@ utf8_egc_len(const char* gcluster, int* colcount){ if(iswspace(wc)){ // newline or tab return ret + 1; } - cols = 0; + ret += r; + break; } *colcount += cols; }