rnd-19990205-1
[rocksndiamonds.git] / src / buttons.c
index e63a2b2dc4bf2842fe0a038f5b0ac0f5269cac84..7c1e9c9a0ee99bf9a1c84d1ffb1a2fddbdf8dad7 100644 (file)
@@ -1862,7 +1862,7 @@ static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap)
 
       case GDI_INFO_TEXT:
        {
-         int max_textsize = MAX_INFO_TEXTSIZE;
+         int max_textsize = MAX_INFO_TEXTSIZE - 1;
 
          strncpy(gi->info_text, va_arg(ap, char *), max_textsize);
          gi->info_text[max_textsize] = '\0';
@@ -2297,7 +2297,7 @@ void HandleGadgets(int mx, int my, int button)
   static unsigned long pressed_delay = 0;
   static int last_button = 0;
   static int last_mx = 0, last_my = 0;
-  int scrollbar_mouse_pos;
+  int scrollbar_mouse_pos = 0;
   struct GadgetInfo *new_gi, *gi;
   boolean press_event;
   boolean release_event;