nspcc-dev / neo-go

Go Node and SDK for the Neo blockchain
MIT License
123 stars 79 forks source link

modmul operation returns wrong results for negative numbers #3598

Closed Slava0135 closed 1 month ago

Slava0135 commented 1 month ago

Current Behavior

For negative numbers operation returns wrong results (compared to C#).

100 * -1 % -91 == 82

image

Expected Behavior

C# results:

100 * -1 % -91 == -9

Possible Solution

Steps to Reproduce

  1. ./bin/neo-go vm
  2. loadbase64 AGQA/wClpQ==
  3. run

Your Environment