[#1067] adm: Fix panic on negative value

Signed-off-by: Anoke <rustamgta1011@gmail.com>
This commit is contained in:
Rustam Akberov 2024-05-08 01:08:50 +03:00
parent ec2873caa7
commit 0932c9f7bf

View file

@ -48,7 +48,7 @@ func SetPolicyCmd(cmd *cobra.Command, args []string) error {
value, err := strconv.ParseUint(v, 10, 32) value, err := strconv.ParseUint(v, 10, 32)
if err != nil { if err != nil {
return fmt.Errorf("can't parse parameter value '%s': %w", args[1], err) return fmt.Errorf("can't parse parameter value '%s': %w", args[i], err)
} }
emit.AppCall(bw.BinWriter, policy.Hash, "set"+k, callflag.All, int64(value)) emit.AppCall(bw.BinWriter, policy.Hash, "set"+k, callflag.All, int64(value))