Welcome to little lamb

Code » anopa » commit ae768d7

Minor fix..

author Olivier Brunel
2018-01-16 19:23:45 UTC
committer Olivier Brunel
2018-01-16 19:26:39 UTC
parent a11e6ddc39cd33ccddecbddbe29a215d923c6821

Minor fix..

..or should I say, incomplete.

Really this whole flush/noflush thing is a mess, and should be addressed
properly. We need to just have "regular" and flush functions, the later
to force flushing when needed.

But at least for now, this should fix issue when the buffer gets full
and we're noflushing, resulting in a messy/truncated output.

src/libanopa/stats.c +1 -1

diff --git a/src/libanopa/stats.c b/src/libanopa/stats.c
index fa6377f..957db2f 100644
--- a/src/libanopa/stats.c
+++ b/src/libanopa/stats.c
@@ -62,7 +62,7 @@ aa_show_stat_names (const char  *names,
         if (i > 0)
             aa_bs_noflush (AA_OUT, "; ");
         aa_is_noflush (AA_OUT, ansi_color);
-        aa_bs_noflush (AA_OUT, names + ga_get (size_t, ga_offets, i));
+        aa_bs_flush (AA_OUT, names + ga_get (size_t, ga_offets, i));
         aa_is_noflush (AA_OUT, ANSI_HIGHLIGHT_ON);
     }
     aa_end_title ();