diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 20532416c..83f502351 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -2929,10 +2929,10 @@ void GMainWindow::OnMenuInstallToNAND() { | |||
| 2929 | 2929 | ||
| 2930 | int remaining = filenames.size(); | 2930 | int remaining = filenames.size(); |
| 2931 | 2931 | ||
| 2932 | // This would only overflow above 2^43 bytes (8.796 TB) | 2932 | // This would only overflow above 2^51 bytes (2.252 PB) |
| 2933 | int total_size = 0; | 2933 | int total_size = 0; |
| 2934 | for (const QString& file : files) { | 2934 | for (const QString& file : files) { |
| 2935 | total_size += static_cast<int>(QFile(file).size() / 0x1000); | 2935 | total_size += static_cast<int>(QFile(file).size() / 1_MiB); |
| 2936 | } | 2936 | } |
| 2937 | if (total_size < 0) { | 2937 | if (total_size < 0) { |
| 2938 | LOG_CRITICAL(Frontend, "Attempting to install too many files, aborting."); | 2938 | LOG_CRITICAL(Frontend, "Attempting to install too many files, aborting."); |
| @@ -3088,7 +3088,7 @@ InstallResult GMainWindow::InstallNCA(const QString& filename) { | |||
| 3088 | return false; | 3088 | return false; |
| 3089 | } | 3089 | } |
| 3090 | 3090 | ||
| 3091 | std::array<u8, 0x1000> buffer{}; | 3091 | std::vector<u8> buffer(1_MiB); |
| 3092 | 3092 | ||
| 3093 | for (std::size_t i = 0; i < src->GetSize(); i += buffer.size()) { | 3093 | for (std::size_t i = 0; i < src->GetSize(); i += buffer.size()) { |
| 3094 | if (install_progress->wasCanceled()) { | 3094 | if (install_progress->wasCanceled()) { |