Skip to content

Commit

Permalink
Merge pull request #477 from carstene1ns/fix/build
Browse files Browse the repository at this point in the history
Fix building for Android
  • Loading branch information
Ghabry committed Mar 29, 2024
2 parents ad97cac + 19dc370 commit a7f3d95
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/reader_lcf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ 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()) {
break;
}
}
if (!ss.str().empty()) {
Log::Debug(ss.str().c_str());
Log::Debug("%s", ss.str().c_str());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/reader_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/writer_lcf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>((uint8_t)(((value >> i) & 0x7F) | (i > 0 ? 0x80 : 0)));
}

Expand Down

0 comments on commit a7f3d95

Please sign in to comment.