From ca049e5f6f723c7c1c287786fa91cfed5e21ea5c Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sat, 5 Apr 2025 20:03:24 +0100 Subject: [PATCH] Bug fix in parser when reading large integers --- src/parser.cpp | 2 +- src/parser.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index aca2c40..df1f04f 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -93,7 +93,7 @@ class len_tag; //see https://github.com/boostorg/spirit/issues/680 const x3::rule> torrent = "torrent"; const x3::rule torrent_value = "torrent_value"; -const x3::rule torrent_int = "torrent_int"; +const x3::rule torrent_int = "torrent_int"; const x3::rule torrent_string = "torrent_string"; const x3::rule> torrent_list = "torrent_list"; const x3::rule> torrent_dict = "torrent_dict"; diff --git a/src/parser.hpp b/src/parser.hpp index c3eb10b..0c3f341 100644 --- a/src/parser.hpp +++ b/src/parser.hpp @@ -9,7 +9,7 @@ namespace duck { typedef std::string_view TorrentStringType; -typedef long long int TorrentIntType; +typedef signed long long int TorrentIntType; struct TorrentValue : public boost::spirit::x3::variant< TorrentIntType,