Skip to content

Accept 0x-prefixed hex strings for MDToken inputs - #22

Merged
KernelErr merged 1 commit into
KernelErr:mainfrom
r0x5a:main
Jul 24, 2026
Merged

KernelErr merged 1 commit into
KernelErr:mainfrom
r0x5a:main

Conversation

@r0x5a

@r0x5a r0x5a commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

dnSpy's UI and this server's own signature/error formats show tokens in hex, but token inputs (token / method_token) only parsed decimal uints, forcing LLMs to convert by hand. Route string parsing in ReadOptionalUInt through a new TryParseUInt that takes decimal or 0x-prefixed hex (leading '#' tolerated), declare the 13 token schema properties as integer|string so clients don't reject hex at validation, and cover it with an e2e step feeding decompile_by_token a hex token.

dnSpy's UI and this server's own signature/error formats show tokens in
hex, but token inputs (token / method_token) only parsed decimal uints,
forcing LLMs to convert by hand. Route string parsing in ReadOptionalUInt
through a new TryParseUInt that takes decimal or 0x-prefixed hex (leading
'#' tolerated), declare the 13 token schema properties as integer|string
so clients don't reject hex at validation, and cover it with an e2e step
feeding decompile_by_token a hex token.
@KernelErr
KernelErr merged commit 12e3fb4 into KernelErr:main Jul 24, 2026
3 checks passed
@KernelErr

Copy link
Copy Markdown
Owner

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants