From 5f60042249b3c18e933da7d830a968c603f547f0 Mon Sep 17 00:00:00 2001
From: Sojourner Truth <jon.w.wilkes@gmail.com>
Date: Sat, 2 Jul 2016 19:18:37 -0400
Subject: [PATCH] fix typo that broke message box border redrawing, and add
 some brackets in a long conditional

---
 pd/src/g_text.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pd/src/g_text.c b/pd/src/g_text.c
index db94daea3..96e1dccef 100644
--- a/pd/src/g_text.c
+++ b/pd/src/g_text.c
@@ -2242,7 +2242,7 @@ void text_drawborder(t_text *x, t_glist *glist,
             gui_vmess("gui_message_redraw_border", "xsii",
                 glist_getcanvas(glist),
                 tag,
-                x2 - x2,
+                x2 - x1,
                 y2 - y1);
         }
     }
@@ -2362,6 +2362,7 @@ void text_drawborder_withtag(t_text *x, t_glist *glist,
         msg_draw_const = ((y2-y1)/4);
         if (msg_draw_const > 10) msg_draw_const = 10; /* looks bad if too big */
         if (firsttime)
+        {
             /* Doesn't look like this is necessary... */
             sys_vgui(".x%lx.c create ppolygon "
                      "%d %d %d %d %d %d %d %d %d %d %d %d %d %d "
@@ -2372,6 +2373,7 @@ void text_drawborder_withtag(t_text *x, t_glist *glist,
                      x2, y2-msg_draw_const,  x2+msg_draw_const, y2,  
                 x1, y2,  x1, y1,
                     tag, tag);
+        }
     }
     else if (x->te_type == T_ATOM)
     {
-- 
GitLab