mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Avoid a dangerous zero.
This commit is contained in:
1 parent
be9c4b14c4
commit
dfad2ba845
1 file changed
+4
-1
@@ -147,7 +147,10 @@ void PSPGamedataInstallDialog::updateProgress() {
|
||||
// Update progress bar(if there is).
|
||||
// progress value is progress[3] << 24 | progress[2] << 16 | progress[1] << 8 | progress[0].
|
||||
// We only should update progress[0] here as the max progress value is 100.
|
||||
progressValue = (int)(allReadSize / allFilesSize) * 100;
|
||||
if (allFilesSize != 0)
|
||||
progressValue = (int)(allReadSize / allFilesSize) * 100;
|
||||
else
|
||||
progressValue = 100;
|
||||
request.progress[0] = progressValue;
|
||||
Memory::WriteStruct(paramAddr,&request);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user