@@ -199,7 +199,7 @@ namespace tao
199199 {
200200 using value_t = typename Result::value_type;
201201 const auto size = read_unsigned ( in );
202- if ( in.size ( size ) < size ) {
202+ if ( static_cast < std:: uint64_t >( in.size ( size ) ) < size ) {
203203 throw json_pegtl::parse_error ( " unexpected end of input" , in );
204204 }
205205 const value_t * pointer = reinterpret_cast < const value_t * >( in.current () );
@@ -220,7 +220,7 @@ namespace tao
220220 throw json_pegtl::parse_error ( " non-matching fragment in indefinite length string" , in ); // "String" is text or byte string in RFC 7049 terminology.
221221 }
222222 const auto size = read_unsigned ( in );
223- if ( in.size ( size ) < size ) {
223+ if ( static_cast < std:: uint64_t >( in.size ( size ) ) < size ) {
224224 throw json_pegtl::parse_error ( " unexpected end of input" , in );
225225 }
226226 const value_t * pointer = reinterpret_cast < const value_t * >( in.current () );
@@ -250,7 +250,7 @@ namespace tao
250250 {
251251 // Assumes in.size( 1 ) >= 1 and in.peek_byte() is the byte with major/minor.
252252
253- if ( internal::peek_minor ( in ) != minor_mask ) {
253+ if ( internal::peek_minor ( in ) != minor_mask ) {
254254 consumer.binary ( read_string_1< tao::byte_view >( in ) );
255255 }
256256 else {
@@ -307,7 +307,7 @@ namespace tao
307307 throw json_pegtl::parse_error ( " non-string object key" , in );
308308 }
309309 internal::throw_on_empty ( in );
310- if ( internal::peek_minor ( in ) != minor_mask ) {
310+ if ( internal::peek_minor ( in ) != minor_mask ) {
311311 consumer.key ( read_string_1< tao::string_view >( in ) );
312312 }
313313 else {
@@ -329,7 +329,7 @@ namespace tao
329329 if ( internal::peek_major ( in ) != major::STRING ) {
330330 throw json_pegtl::parse_error ( " non-string object key" , in );
331331 }
332- if ( internal::peek_minor ( in ) != minor_mask ) {
332+ if ( internal::peek_minor ( in ) != minor_mask ) {
333333 consumer.key ( read_string_1< tao::string_view >( in ) );
334334 }
335335 else {
0 commit comments