From 649775d1010c9c89ea63d90544d41069538f90a7 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 8 Aug 2010 15:48:41 +0200 Subject: [PATCH] SET FORMAT: Flag an error if an invalid format is given. Fixes bug #30682 --- src/language/utilities/set.q | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/language/utilities/set.q b/src/language/utilities/set.q index 6a1d184f..3c0109cc 100644 --- a/src/language/utilities/set.q +++ b/src/language/utilities/set.q @@ -484,6 +484,10 @@ stc_custom_format (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_se lex_match (lexer, '='); if (!parse_format_specifier (lexer, &fmt)) return 0; + + if (!fmt_check_output (&fmt)) + return 0; + if (fmt_is_string (fmt.type)) { char str[FMT_STRING_LEN_MAX + 1]; -- 2.30.2