diff --git a/HEX.CPP b/HEX.CPP index 1353bb4..1094943 100644 --- a/HEX.CPP +++ b/HEX.CPP @@ -37,7 +37,7 @@ std::string Hex( uint32_t const value ) noexcept { char temp_string[ 65 ]; - std::size_t const number_of_characters = ::sprintf( temp_string, "%04lX", static_cast(value) ); + std::size_t const number_of_characters = ::sprintf( temp_string, "%04" PRIX32, static_cast(value) ); return( std::string(temp_string, number_of_characters) ); } diff --git a/NMEA0183.H b/NMEA0183.H index 22dc8f9..4b9d717 100644 --- a/NMEA0183.H +++ b/NMEA0183.H @@ -46,6 +46,7 @@ SOFTWARE. #include #include #include +#include #define STRING_VIEW(_x) std::string_view( _x, std::size(_x) - 1)