Handle negative numbers in aci (#247)
* Handle negative numbers in aci Fixes aeternity/aesophia_http#59 * Updated CHANGELOG Updated CHANGELOG1 Co-authored-by: radrow <radrowicki@gmail.com>
This commit is contained in:
parent
83e03f3013
commit
515838e2f9
@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
- Bug fix: Fixed ACI encoder to handle `-` unary operator
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
## [4.2.0] - 2020-01-15
|
## [4.2.0] - 2020-01-15
|
||||||
|
@ -194,6 +194,8 @@ encode_expr({bytes, _, B}) ->
|
|||||||
encode_expr({Lit, _, L}) when Lit == oracle_pubkey; Lit == oracle_query_id;
|
encode_expr({Lit, _, L}) when Lit == oracle_pubkey; Lit == oracle_query_id;
|
||||||
Lit == contract_pubkey; Lit == account_pubkey ->
|
Lit == contract_pubkey; Lit == account_pubkey ->
|
||||||
aeser_api_encoder:encode(Lit, L);
|
aeser_api_encoder:encode(Lit, L);
|
||||||
|
encode_expr({app, _, {'-', _}, [{int, _, N}]}) ->
|
||||||
|
encode_expr({int, [], -N});
|
||||||
encode_expr({app, _, F, As}) ->
|
encode_expr({app, _, F, As}) ->
|
||||||
Ef = encode_expr(F),
|
Ef = encode_expr(F),
|
||||||
Eas = encode_exprs(As),
|
Eas = encode_exprs(As),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user