Process -t/-T later than -m, so that they can override -m's default behaviour
[u/mdw/putty] / terminal.c
index 0a03f3a..f58941f 100644 (file)
@@ -1722,7 +1722,7 @@ void term_provide_resize_fn(Terminal *term,
 {
     term->resize_fn = resize_fn;
     term->resize_ctx = resize_ctx;
-    if (term->cols > 0 && term->rows > 0)
+    if (resize_fn && term->cols > 0 && term->rows > 0)
        resize_fn(resize_ctx, term->cols, term->rows);
 }
 
@@ -6441,7 +6441,7 @@ int term_get_userpass_input(Terminal *term, prompts_t *p,
         */
        {
            int i;
-           for (i = 0; i < p->n_prompts; i++)
+           for (i = 0; i < (int)p->n_prompts; i++)
                memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
        }
     }