diff --git a/neercs/term/pty.cpp b/neercs/term/pty.cpp index 46389f6..6adb8cd 100644 --- a/neercs/term/pty.cpp +++ b/neercs/term/pty.cpp @@ -53,7 +53,7 @@ Pty::Pty() Pty::~Pty() { #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H - delete m_unread_data; + delete[] m_unread_data; if (m_fd >= 0) { diff --git a/neercs/video/render.cpp b/neercs/video/render.cpp index aef23ed..0539338 100644 --- a/neercs/video/render.cpp +++ b/neercs/video/render.cpp @@ -864,7 +864,9 @@ void Render::TickDraw(float seconds) int bar_x = bar_w * setup_var[setup_item_key].x; if ((setup_var[setup_item_key].y - setup_var[setup_item_key].x) / setup_var[setup_item_key].z > 1) { - caca_printf(m_caca, setup_p.x + setup_size.x - 4, y, "%4.2f", setup_var[setup_item_key].w); + /* Work around a bug in libcaca */ + if (setup_p.x + setup_size.x - 4 < caca_get_canvas_width(m_caca)) + caca_printf(m_caca, setup_p.x + setup_size.x - 4, y, "%4.2f", setup_var[setup_item_key].w); caca_draw_line(m_caca, x, y, x - bar_x + bar_w * setup_var[setup_item_key].y, y,'.'); if (setup_var[setup_item_key].w != setup_var[setup_item_key].x) caca_draw_line(m_caca, x, y, x - bar_x + bar_w * setup_var[setup_item_key].w, y,'x'); }