diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index 95811df..a5f55d9 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -238,11 +238,11 @@ static gboolean update_monitors(t_global_monitor *global) if (global->monitor->options.show_bars) gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(global->monitor->status[i]), temp); - format_byte_humanreadable( buffer[i], BUFSIZ, display[i], 2 ); - format_byte_humanreadable( buffer_panel[i], BUFSIZ, display[i], 0 ); + format_byte_humanreadable( buffer[i], BUFSIZ - 1, display[i], 2 ); + format_byte_humanreadable( buffer_panel[i], BUFSIZ - 1, display[i], 0 ); } - format_byte_humanreadable( buffer[TOT], BUFSIZ, (display[IN]+display[OUT]), 2 ); + format_byte_humanreadable( buffer[TOT], BUFSIZ - 1, (display[IN]+display[OUT]), 2 ); { char* ip = get_ip_address(&(global->monitor->data));