From 7a43fb95afa4cee74b2282f38789bbc363b86dd7 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 20 Jul 2025 21:58:24 -0400 Subject: oasm: lex: Convert and store to uint16_t Signed-off-by: Ian Moffett --- usr.bin/oasm/lex.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr.bin/oasm/lex.c') diff --git a/usr.bin/oasm/lex.c b/usr.bin/oasm/lex.c index c2a7a1f..f8427e0 100644 --- a/usr.bin/oasm/lex.c +++ b/usr.bin/oasm/lex.c @@ -297,6 +297,10 @@ lex_tok(struct oasm_state *state, struct oasm_token *ttp) /* Immediate operand? */ if ((tok = token_operand(p)) != TT_UNKNOWN) { + if (tok == TT_IMM) { + ttp->imm = atoi(&p[1]); + } + ttp->type = tok; ttp->raw = p; return 0; -- cgit v1.2.3