diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-text/statusbar-items.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c index 044c2fa0..e3e0c2a6 100644 --- a/src/fe-text/statusbar-items.c +++ b/src/fe-text/statusbar-items.c @@ -347,10 +347,14 @@ static void item_lag(SBAR_ITEM_REC *item, int get_size_only) last_lag_unknown = lag_unknown; if (lag_unknown) { - g_snprintf(str, sizeof(str), "%d (?""?)", lag/100); + // "??)" in C becomes ']' + // See: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C + g_snprintf(str, sizeof(str), "%d (?""?)", lag / 100); } else { - g_snprintf(str, sizeof(str), - lag%100 == 0 ? "%d" : "%d.%02d", lag/100, lag%100); + if (lag % 100 == 0) + g_snprintf(str, sizeof(str), "%d", lag / 100); + else + g_snprintf(str, sizeof(str), "%d.%02d", lag / 100, lag % 100); } statusbar_item_default_handler(item, get_size_only, |