diff --git a/hex_functions.cpp b/hex_functions.cpp index e07a7b0..683097e 100644 --- a/hex_functions.cpp +++ b/hex_functions.cpp @@ -57,10 +57,10 @@ namespace omni return "FF"; std::stringstream stream; - stream << std::setfill ('0') << std::setw(sizeof(char)*2) + stream << std::setfill('0') << std::setw(sizeof(char)*2) << std::hex << input; std::string result(stream.str()); - std::transform(str.begin(), str.end(), str.begin(), ::toupper); + std::transform(result.begin(), result.end(), result.begin(), ::toupper); return result; } diff --git a/hex_functions.h b/hex_functions.h index 9f7a1e7..1f22339 100644 --- a/hex_functions.h +++ b/hex_functions.h @@ -6,6 +6,8 @@ #include #include #include +#include +#include namespace omni {