diff options
Diffstat (limited to 'Source/CursesDialog/form/frm_post.c')
-rw-r--r-- | Source/CursesDialog/form/frm_post.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/CursesDialog/form/frm_post.c b/Source/CursesDialog/form/frm_post.c index 5ead942..924fe6a 100644 --- a/Source/CursesDialog/form/frm_post.c +++ b/Source/CursesDialog/form/frm_post.c @@ -51,6 +51,7 @@ int post_form(FORM * form) WINDOW *formwin; int err; int page; + int height, width; if (!form) RETURN(E_BAD_ARGUMENT); @@ -62,7 +63,8 @@ int post_form(FORM * form) RETURN(E_NOT_CONNECTED); formwin = Get_Form_Window(form); - if ((form->cols > getmaxx(formwin)) || (form->rows > getmaxy(formwin))) + getmaxyx(formwin, height, width); + if ((form->cols > width) || (form->rows > height)) RETURN(E_NO_ROOM); /* reset form->curpage to an invald value. This forces Set_Form_Page |