mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Warning fixes, alignment checks
This commit is contained in:
1 parent
fba2489c79
commit
5260be6f69
7 files changed
+28
-9
No files matched your search
@@ -61,16 +61,16 @@ size_t ZipFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data, Flags fl
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (absolutePos + bytes > dataFileSize_) {
|
||||
if (absolutePos + (s64)bytes > dataFileSize_) {
|
||||
// TODO: This could go negative..
|
||||
bytes = dataFileSize_ - absolutePos;
|
||||
}
|
||||
|
||||
// Decompress until the requested point, filling up data_ as we go. TODO: Do on thread.
|
||||
while (dataReadPos_ < absolutePos + bytes) {
|
||||
while (dataReadPos_ < absolutePos + (s64)bytes) {
|
||||
int remaining = BLOCK_SIZE;
|
||||
if (dataReadPos_ + remaining > dataFileSize_) {
|
||||
remaining = dataFileSize_ - dataReadPos_;
|
||||
remaining = (int)(dataFileSize_ - dataReadPos_);
|
||||
}
|
||||
zip_int64_t retval = zip_fread(dataFile_, data_ + dataReadPos_, remaining);
|
||||
_dbg_assert_(retval == remaining);
|
||||
|
||||
Reference in new issue
Block a user