summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_scanner.l')
-rw-r--r--mixlib/mix_scanner.l27
1 files changed, 18 insertions, 9 deletions
diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l
index 2b3099b..1ad8eaa 100644
--- a/mixlib/mix_scanner.l
+++ b/mixlib/mix_scanner.l
@@ -434,16 +434,25 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)*
<FSPEC>{
{number}")"(({ws}+.*\n)|\n) {
glong val = atol (yytext);
- if ( val < 0 || val > MIX_BYTE_MAX )
- RETURN_ERROR (MIX_PERR_INV_FSPEC, NULL);
- if ( ins.opcode != mix_opMOVE
- && ins.opcode != mix_opNOP
- && ( ins.opcode < mix_opJBUS || ins.opcode > mix_opJXx )
- && !mix_fspec_is_valid (mix_byte_new (val)) )
+
+ if (val < 0 || val > MIX_BYTE_MAX)
RETURN_ERROR (MIX_PERR_INV_FSPEC, NULL);
- if ( nof )
- mix_parser_log_error (parser, MIX_PERR_INV_FSPEC,
- lineno, _("ignored"), TRUE);
+
+ if (ins.opcode != mix_opMOVE
+ && ins.opcode != mix_opNOP
+ && ( ins.opcode < mix_opJBUS || ins.opcode > mix_opJXx )
+ && !mix_fspec_is_valid (mix_byte_new (val)) )
+ {
+ gchar *spec = g_strdup_printf ("%d", (int)val);
+ mix_parser_log_error (parser, MIX_PERR_INV_FSPEC, lineno, spec, TRUE);
+ g_free (spec);
+ }
+
+ if (nof)
+ {
+ mix_parser_log_error (parser, MIX_PERR_INV_FSPEC,
+ lineno, _("ignored"), TRUE);
+ }
else
{
ins.fspec = mix_byte_new (val);