Skip to content

Commit b86fc8b

Browse files
xingguo01Copilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 08a1d38 commit b86fc8b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/portable/executor_runner/executor_runner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Error load_input_files(
150150
return Error::Internal;
151151
}
152152

153+
// Reserve memory for actual file contents.
153154
// Reserve memory for actual file contents.
154155
inputs_storage.emplace_back(static_cast<size_t>(file_size), '\0');
155156

@@ -158,8 +159,8 @@ Error load_input_files(
158159
return Error::AccessFailed;
159160
}
160161

161-
input_buffers.emplace_back(&inputs_storage.back()[0], file_size);
162-
}
162+
input_buffers.emplace_back(
163+
inputs_storage.back().data(), static_cast<size_t>(file_size));
163164

164165
return Error::Ok;
165166
}

0 commit comments

Comments
 (0)