From ddf21447e20619a06f7420dd9e0f583d5055b03a Mon Sep 17 00:00:00 2001 From: quantumsheep Date: Mon, 10 Aug 2020 22:35:28 +0200 Subject: [PATCH] Use stoull and uint64_t for for integer parsing --- src/grammar/Visitor.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/grammar/Visitor.hpp b/src/grammar/Visitor.hpp index a3192e7..c964abf 100644 --- a/src/grammar/Visitor.hpp +++ b/src/grammar/Visitor.hpp @@ -62,6 +62,7 @@ #include #include #include +#include namespace Sand { @@ -3322,14 +3323,14 @@ class Visitor str.erase(std::remove(str.begin(), str.end(), '_'), str.end()); str.erase(std::remove(str.begin(), str.end(), '\''), str.end()); - unsigned long integer = 0; + uint64_t integer = 0; std::string name = ""; Type *type = nullptr; bool is_signed = true; try { - integer = std::stoul(str, nullptr, base); + integer = std::stoull(str, nullptr, base); } catch (std::out_of_range &) {