fix segfault in prompter
[mmh] / uip / prompter.c
index 24f2d9f..c715cb7 100644 (file)
@@ -57,7 +57,7 @@ main(int argc, char **argv)
        int fdi, fdo, i;
        char *cp, *drft = NULL;
        enum state state;
-       struct field f = {{0}};
+       struct field f = free_field;
        char buffer[BUFSIZ], tmpfil[BUFSIZ];
        char **arguments, **argp;
        FILE *in, *out;
@@ -184,7 +184,7 @@ abort:
                case FILEEOF2:
                        fprintf(out, "--------\n");
                        if (qbody) {
-                               if (!*f.value) {
+                               if (f.value == NULL) {
                                        printf("--------\n");
                                        goto has_no_body;
                                }