Implemented support for very long strings a la spss v13/v14
[pspp-builds.git] / src / language / lexer / format-parser.c
index 69a83b78676fe5f8ec6d1ceb73595461012ccf61..b539432eb1d9b457773d80fca2803851cc254170 100644 (file)
@@ -128,6 +128,11 @@ parse_format_specifier (struct fmt_spec *input, enum fmt_parse_flags flags)
              ds_c_str (&tokstr));
       return 0;
     }
+  if ( w > MAX_STRING )
+    {
+      msg (SE, _("String variable width may not exceed %d"), MAX_STRING);
+      return 0;
+    }
 
   cp = cp2;
   if (f->n_args > 1 && *cp == '.')