unicode combining: don't log overflow errors unless LOG_ENABLE_DBG == 1

This commit is contained in:
Daniel Eklöf 2020-06-09 17:31:58 +02:00
parent e7d7b30c84
commit fb001ee7a7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 4 additions and 1 deletions

View file

@ -28,6 +28,8 @@
lines in the scrolling region..
* New terminal windows spawned with `ctrl`+`shift`+`n` are no longer
double forked.
* Unicode combining character overflow errors are only logged in when
debug logging has been enabled.
### Deprecated

3
vt.c
View file

@ -604,12 +604,13 @@ action_utf8_print(struct terminal *term, wchar_t wc)
if (wanted_count > ALEN(composed->combining)) {
assert(composed != NULL);
#if defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
LOG_WARN("combining character overflow:");
LOG_WARN(" base: 0x%04x", composed->base);
for (size_t i = 0; i < composed->count; i++)
LOG_WARN(" cc: 0x%04x", composed->combining[i]);
LOG_ERR(" new: 0x%04x", wc);
#endif
/* This are going to break anyway... */
wanted_count--;
}