Skip to content

Commit a7f3d95

Browse files
authoredMar 29, 2024··
Merge pull request #477 from carstene1ns/fix/build
Fix building for Android
2 parents ad97cac + 19dc370 commit a7f3d95

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎src/reader_lcf.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,15 @@ void LcfReader::Skip(const struct LcfReader::Chunk& chunk_info, const char* wher
290290
LcfReader::Read(byte);
291291
ss << std::setfill('0') << std::setw(2) << (int)byte << " ";
292292
if ((i+1) % 16 == 0) {
293-
Log::Debug(ss.str().c_str());
293+
Log::Debug("%s", ss.str().c_str());
294294
ss.str("");
295295
}
296296
if (Eof()) {
297297
break;
298298
}
299299
}
300300
if (!ss.str().empty()) {
301-
Log::Debug(ss.str().c_str());
301+
Log::Debug("%s", ss.str().c_str());
302302
}
303303
}
304304

‎src/reader_struct.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct Primitive {
196196

197197
if (dif != 0) {
198198
// Fix incorrect read pointer position
199-
Log::Warning("Invalid %s at %X", typeid(T).name(), stream.Tell());
199+
Log::Warning("Invalid %s at %" PRIX32 "", typeid(T).name(), stream.Tell());
200200
stream.Seek(dif, LcfReader::FromCurrent);
201201
}
202202
}

‎src/writer_lcf.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void LcfWriter::WriteInt(int val) {
5656

5757
void LcfWriter::WriteUInt64(uint64_t value) {
5858
for (int i = 56; i >= 0; i -= 7)
59-
if (value >= (1LL << i) || i == 0)
59+
if (value >= (1ULL << i) || i == 0)
6060
Write<uint8_t>((uint8_t)(((value >> i) & 0x7F) | (i > 0 ? 0x80 : 0)));
6161
}
6262

0 commit comments

Comments
 (0)
Please sign in to comment.