You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the contract contains special characters, for example french accents, the .source_mapping.content object is returning the expected output, it looks like it's crops by the number of special characters before the source.
Code example to reproduce the issue:
Coin.sol:
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
contract Coin {
address public minter;
mapping (address => uint) public balances;
event Sent(address from, address to, uint amount);
// ààà
constructor() {
minter = msg.sender;
}
// ééé
function mint(address receiver, uint amount) public {
require(msg.sender == minter);
balances[receiver] += amount;
}
}
If you run:
from slither.slither import Slither
slither = Slither('ok.sol')
for contract in slither.contracts:
for f in contract.functions:
print(f.source_mapping.content)
print("---")
Describe the issue:
If the contract contains special characters, for example french accents, the
.source_mapping.content
object is returning the expected output, it looks like it's crops by the number of special characters before the source.Code example to reproduce the issue:
Coin.sol
:If you run:
You get:
Version:
0.10.4
Relevant log output:
No response
The text was updated successfully, but these errors were encountered: