Skip to content

Commit

Permalink
Merge remote-tracking branch 'DanielMartensson/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
debevv committed Dec 8, 2024
2 parents 715fd8b + c34c651 commit cfc1dd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nanomodbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ static nmbs_error handle_read_file_record(nmbs_t* nmbs) {
uint16_t record_number;
uint16_t record_length;
}
#ifdef __STDC_NO_VLA__
#if defined(__STDC_NO_VLA__) || defined(_MSC_VER)
subreq[35]; // 245 / subreq_header_size
#else
subreq[subreq_count];
Expand Down Expand Up @@ -1553,7 +1553,7 @@ static nmbs_error handle_read_write_registers(nmbs_t* nmbs) {
if (err != NMBS_ERROR_NONE)
return err;

#ifdef __STDC_NO_VLA__
#if defined(__STDC_NO_VLA__) || defined(_MSC_VER)
uint16_t registers[0x007B];
#else
uint16_t registers[byte_count_write / 2];
Expand Down Expand Up @@ -1596,7 +1596,7 @@ static nmbs_error handle_read_write_registers(nmbs_t* nmbs) {
}

if (!nmbs->msg.broadcast) {
#ifdef __STDC_NO_VLA__
#if defined(__STDC_NO_VLA__) || defined(_MSC_VER)
uint16_t regs[125];
#else
uint16_t regs[read_quantity];
Expand Down

0 comments on commit cfc1dd0

Please sign in to comment.