diff options
author | Thomas White <taw@physics.org> | 2017-09-24 11:04:09 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-09-24 11:04:09 +0200 |
commit | 4400bbe3a19a96eb646c2e9d1e17bc0e579d871d (patch) | |
tree | 9e3b89c00294a386f9a1059a8b1988dff00788b4 /src/sc_interp.c | |
parent | ea5997b711faf2214304e4b6b60588ca61be14e6 (diff) |
Zero-length blocks are OK
Diffstat (limited to 'src/sc_interp.c')
-rw-r--r-- | src/sc_interp.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c index 44f9412..ecb94d1 100644 --- a/src/sc_interp.c +++ b/src/sc_interp.c @@ -889,7 +889,6 @@ static int in_macro(SCInterpreter *scin) static int add_text(struct frame *fr, PangoContext *pc, SCBlock *bl, PangoLanguage *lang, int editable, SCInterpreter *scin) { - glong len_chars; const char *text = sc_block_contents(bl); size_t start, len_bytes; PangoFontDescription *fontdesc; @@ -901,10 +900,6 @@ static int add_text(struct frame *fr, PangoContext *pc, SCBlock *bl, /* Empty block? */ if ( text == NULL ) return 1; - /* Zero-length block? */ - len_chars = g_utf8_strlen(text, -1); - if ( len_chars == 0 ) return 1; - fontdesc = sc_interp_get_fontdesc(scin); col = sc_interp_get_fgcol(scin); mrb = sc_interp_get_macro_real_block(scin); |