1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

updated fift/func

This commit is contained in:
ton 2019-12-12 19:16:25 +04:00
parent b6f6788532
commit d41ce55305
31 changed files with 717 additions and 66 deletions

View file

@ -102,13 +102,15 @@ unsigned long long get_special_value(std::string str) {
unsigned long long val = 0;
int bits = 0;
if (str[0] == '#') {
while (i < n) {
int c = str[i++];
for (; i < n; i++) {
int c = str[i];
if (c == '_') {
break;
}
if (c >= '0' && c <= '9') {
c -= '0';
} else if (c >= 'A' && c <= 'F') {
c -= 'A' - 10;
} else if (c >= 'a' && c <= 'f') {
c -= 'a' - 10;
} else {
@ -146,6 +148,9 @@ unsigned long long get_special_value(std::string str) {
while (bits && !((val >> (64 - bits)) & 1)) {
--bits;
}
if (bits) {
--bits;
}
}
if (bits == 64) {
return 0;