Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompilation fails to escape closing brace ("}") properly within an interpolated string. #2544

Closed
nedsociety opened this issue Nov 9, 2021 · 1 comment
Labels
Bug Decompiler The decompiler engine itself

Comments

@nedsociety
Copy link

nedsociety commented Nov 9, 2021

Input code

The code in question is from a proprietary software that I'm not affiliated with so I believe I have no right to upload it. It might fall under fair use if used for this specific bug report, but making it publicly accessible would be definitely nay. If there's a channel to privately share it, please instruct the process.

Erroneous output

                public void UpdateIsAwaitingConnectCallbacksOfEntity(List<ChannelEntity> channelEntity, bool isAwaitingConnectCallback)
		{
                //...
					PubNubInstance.PNLog.WriteToLog($"UpdateIsAwaitingConnectCallbacksOfEntity not found key/val1 {item.ChannelID.ChannelOrChannelGroupName} {item.ChannelID.IsChannelGroup.ToString()}}", PNLoggingMethod.LevelInfo);
		//...
                }

error CS8086: A '}' character must be escaped (by doubling) in an interpolated string.

Details

  • Product in use: e.g. ILSpy
  • Version in use: 7.2.0.6702-preview2

The extra brace at the end of the string seems to be an errata originated from the input binary. It just seems like ILSpy fails to escape it. Unfortunately I've failed to reduce it into a minimal-complete-reproducible example as it seems to escape them properly on simpler cases.

@nedsociety nedsociety added Bug Decompiler The decompiler engine itself labels Nov 9, 2021
@siegfriedpammer
Copy link
Member

To make things easy, send the binary to siegfried.pammer@gmail.com, thanks!

ElektroKill added a commit to dnSpyEx/ILSpy that referenced this issue Jan 2, 2022
… format string is not syntactically correct.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

No branches or pull requests

2 participants