bug fix - prevents core-dumping on scan -format '1'
[mmh] / sbr / fmt_compile.c
index d3e5ea9..e857c7d 100644 (file)
@@ -270,6 +270,7 @@ fmt_compile(char *fstring, struct format **fmt)
      * normal processing.
      */
     i = strlen(fstring)/2 + 1;
+               if (i==1) i++;
     next_fp = formatvec = (struct format *)calloc ((size_t) i,
                                                   sizeof(struct format));
     if (next_fp == NULL)