diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:41 +0000 |
commit | 022ebf5bbf58ca2dd943d3376cc95a6b206db799 (patch) | |
tree | 4069ef3b75eed2d68683cb6224a627c24cd95b15 /ELF/Strings.cpp | |
parent | fbe69f787ace06f44b6cb1bd3cd45ac703a16a05 (diff) |
Notes
Diffstat (limited to 'ELF/Strings.cpp')
-rw-r--r-- | ELF/Strings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ELF/Strings.cpp b/ELF/Strings.cpp index 29760b492ba9..2e88bfba0fc1 100644 --- a/ELF/Strings.cpp +++ b/ELF/Strings.cpp @@ -46,7 +46,7 @@ int elf::getPriority(StringRef S) { if (Pos == StringRef::npos) return 65536; int V; - if (S.substr(Pos + 1).getAsInteger(10, V)) + if (!to_integer(S.substr(Pos + 1), V, 10)) return 65536; return V; } @@ -68,7 +68,7 @@ std::vector<uint8_t> elf::parseHex(StringRef S) { StringRef B = S.substr(0, 2); S = S.substr(2); uint8_t H; - if (B.getAsInteger(16, H)) { + if (!to_integer(B, H, 16)) { error("not a hexadecimal value: " + B); return {}; } |