summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/main.c b/main.c
index e90a92b..64dbdda 100644
--- a/main.c
+++ b/main.c
@@ -86,14 +86,16 @@ int main() {
form_driver(form, REQ_DEL_PREV);
break;
case '\r':
- unpost_form(form);
- formactive = FALSE;
- curs_set(0);
- refresh();
- box(stdscr, 0, 0);
- run_sim(form);
- padscroll = 0;
- prefresh(pad, padscroll, 0, 4, 1, HEIGHT-2, WIDTH-1);
+ if (E_OK == form_driver(form, REQ_VALIDATION)) {
+ unpost_form(form);
+ formactive = FALSE;
+ curs_set(0);
+ refresh();
+ box(stdscr, 0, 0);
+ run_sim(form);
+ padscroll = 0;
+ prefresh(pad, padscroll, 0, 4, 1, HEIGHT-2, WIDTH-1);
+ }
break;
default:
/* If this is a normal character, it gets */