diff --git a/src/reader_lcf.cpp b/src/reader_lcf.cpp index 55587f02..386c8b0a 100644 --- a/src/reader_lcf.cpp +++ b/src/reader_lcf.cpp @@ -290,7 +290,7 @@ void LcfReader::Skip(const struct LcfReader::Chunk& chunk_info, const char* wher LcfReader::Read(byte); ss << std::setfill('0') << std::setw(2) << (int)byte << " "; if ((i+1) % 16 == 0) { - Log::Debug(ss.str().c_str()); + Log::Debug("%s", ss.str().c_str()); ss.str(""); } if (Eof()) { @@ -298,7 +298,7 @@ void LcfReader::Skip(const struct LcfReader::Chunk& chunk_info, const char* wher } } if (!ss.str().empty()) { - Log::Debug(ss.str().c_str()); + Log::Debug("%s", ss.str().c_str()); } } diff --git a/src/reader_struct.h b/src/reader_struct.h index 960282fe..05551e46 100644 --- a/src/reader_struct.h +++ b/src/reader_struct.h @@ -196,7 +196,7 @@ struct Primitive { if (dif != 0) { // Fix incorrect read pointer position - Log::Warning("Invalid %s at %X", typeid(T).name(), stream.Tell()); + Log::Warning("Invalid %s at %" PRIX32 "", typeid(T).name(), stream.Tell()); stream.Seek(dif, LcfReader::FromCurrent); } } diff --git a/src/writer_lcf.cpp b/src/writer_lcf.cpp index 0893778a..b679b66b 100644 --- a/src/writer_lcf.cpp +++ b/src/writer_lcf.cpp @@ -56,7 +56,7 @@ void LcfWriter::WriteInt(int val) { void LcfWriter::WriteUInt64(uint64_t value) { for (int i = 56; i >= 0; i -= 7) - if (value >= (1LL << i) || i == 0) + if (value >= (1ULL << i) || i == 0) Write((uint8_t)(((value >> i) & 0x7F) | (i > 0 ? 0x80 : 0))); }