fix: bitstream_index_map overflow

This commit is contained in:
douniwan5788 2024-08-30 16:04:07 +08:00
commit 0710a37429
4 changed files with 7 additions and 5 deletions

View file

@ -797,7 +797,7 @@ static void PacketReceived(PacketCommandNG *packet) {
}
case CMD_SET_FPGAMODE: {
uint8_t mode = packet->data.asBytes[0];
if (mode >= FPGA_BITSTREAM_LF && mode <= FPGA_BITSTREAM_HF_15) {
if (mode >= FPGA_BITSTREAM_MIN && mode <= FPGA_BITSTREAM_MAX) {
FpgaDownloadAndGo(mode);
reply_ng(CMD_SET_FPGAMODE, PM3_SUCCESS, NULL, 0);
}