Skip to content

Commit 763901a

Browse files
committed
Post-rebase fixups
1 parent 7e634a8 commit 763901a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/native/monodroid/embedded-assemblies-zip.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,10 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus
353353
.max_assembly_file_name_size = 0u,
354354
};
355355

356+
std::unique_ptr<uint8_t[]> raw_data (new uint8_t[cd_size]);
357+
std::span<uint8_t> buf (raw_data.get (), cd_size);
356358
ssize_t nread = read (fd, buf.data (), buf.size ());
357-
if (static_cast<size_t>(nread) != cd_size) {
359+
if (static_cast<size_t>(nread) != cd_size) [[unlikely]] {
358360
Helpers::abort_application (
359361
LOG_ASSEMBLY,
360362
Util::monodroid_strdup_printf (

0 commit comments

Comments
 (0)