-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Huge output of 0's on >256 character to Convert.ToHexString() #101757
Comments
You can use
It may be an un-intuitive behavior of implicit dynamic casting. |
I tested on .NET 8.0.4 through PowerShell 7.4.2. If ran on the old non-Core PowerShell 5.1, it uses .NET Framework 4.0, so While it could be argued to be implicit casting behavior, I'd argue that it's a bug to implicitly cast an integer to an array of that length. But that's for PowerShell's repo to decide, not here. |
The issue is with the |
Tagging subscribers to this area: @dotnet/area-system-runtime |
Anyway to port issues across or do I close and open a new one over at PowerShell? Edit: nvm, @colejohnson66 has done it. I guess I'll close this one if Michael considers it a pwsh issue on that ticket? |
Yeah I know how to do it properly once I saw the error, it's just that the error I saw wasn't an exception/message, it was some bad behaviour, so I thought I'd report it. |
Description
I'm hoping this works (you guys can repro) and isn't something wrong with PowerShell's calling of .NET.
I'm running Powershell 7.4 (with whatever .NET API that installs with).
Reproduction Steps
Expected behavior
Probably
"Error: "Value was either too large or too small for an unsigned byte.""
or200F
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
x64 Fedora Linux, I cannot ascertain the .NET version, google tells me to look up the non-existent registry value (please let me know if there's a way to ask the library itself at runtime, even if there might be a way to see via the installed files)
Other information
The text was updated successfully, but these errors were encountered: