Dan Horák 2021-06-18 18:29:25 +02:00
parent 46bb4c0736
commit 8ca2bcc67e

View File

@ -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);
memccpy(buffer, chip, '\0', sizeof(buffer));
return buffer[0] << 24 | buffer[1] << 16 | buffer[2] << 8 | buffer[3];
}