Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::memcpy -> memcpy #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ static void createImage(ImageSettings settings, const uint8_t* stage2, uint32_t
// If total size is less than 64 kB, duplicate the content to the next 64 kB.
// This cheap fix makes it possible to use fake memory cards with a 512 kbits (64 kB) chip.
if (payloadOffset + payload.size() <= out.size() / 2) {
std::memcpy(out.data() + out.size() / 2, out.data(), out.size() / 2);
memcpy(out.data() + out.size() / 2, out.data(), out.size() / 2);
} else {
printf("Note: payload size is more than half the card size.\n");
}
Expand Down