MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.87k stars 845 forks source link

Fix bounds for ContextStack.Top() and ContextStack.Swap() #1021

Closed onvej-sl closed 3 years ago

onvej-sl commented 3 years ago

Furthermore, the comments such as Returns the i-th element from the top of the stack. are quite misleading since i is negative.

NicolasDorier commented 3 years ago

Nice one, can you fix https://github.com/MetacoSA/NBitcoin/pull/1021/files#r667120029 ? Damn that's old code... I wonder why is the context stack even a public class though, and even more wondering why I have commented anything at all.... it is only useful for the script interpreter.