mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 19:00:58 +00:00
decodetree: Allow +- to begin a number initializing a field
Backports commit 263ac638a76a72841e3f513b14c515680703e084 from qemu
This commit is contained in:
parent
e18e116ce5
commit
1f57e9bedc
|
@ -723,7 +723,7 @@ def parse_generic(lineno, is_format, name, toks):
|
|||
continue
|
||||
|
||||
# 'Foo=number' sets an argument field to a constant value
|
||||
if re_fullmatch(re_ident + '=[0-9]+', t):
|
||||
if re_fullmatch(re_ident + '=[+-]?[0-9]+', t):
|
||||
(fname, value) = t.split('=')
|
||||
value = int(value)
|
||||
flds = add_field(lineno, flds, fname, ConstField(value))
|
||||
|
|
Loading…
Reference in a new issue