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

Fix format truncation for GCC >7.1. #62

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
Fix format truncation for GCC >7.1.
phodina committed Feb 21, 2022
commit bc9e5f03d71b3dd4360721f4df3524c1dcba9bc8
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
@@ -1490,7 +1490,7 @@ static bool saveEntry(FILE* outFile, char* path, rk_entry_type type,
static inline uint32_t convertChipType(const char* chip) {
char buffer[5];
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer), "%s", chip);
memcpy(buffer, chip, 4);
return buffer[0] << 24 | buffer[1] << 16 | buffer[2] << 8 | buffer[3];
}