You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2026/08/21 12:32:58 UTC

(plc4x) branch develop updated: fix(plc4c): regenerate s7 for the payload parameter guard

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8280aedcc9 fix(plc4c): regenerate s7 for the payload parameter guard
8280aedcc9 is described below

commit 8280aedcc94a3e7e42b723279e07f528851873c4
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Aug 21 14:31:45 2026 +0200

    fix(plc4c): regenerate s7 for the payload parameter guard
    
    plc4c commits its generated sources and generates s7, so the mspec guard added
    in 488255a5a3 needed regenerating here too - the committed C still read a
    payload with a parameter that was never set. Same fix as plc4j and plc4go
    already carry; no other C-generated protocol uses the changed mspecs.
---
 plc4c/generated-sources/s7/src/s7_message.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4c/generated-sources/s7/src/s7_message.c b/plc4c/generated-sources/s7/src/s7_message.c
index e851dfdc84..16b22ba871 100644
--- a/plc4c/generated-sources/s7/src/s7_message.c
+++ b/plc4c/generated-sources/s7/src/s7_message.c
@@ -186,7 +186,7 @@ if( messageType == 0x07 ) { /* S7MessageUserData */
 
   // Optional Field (payload) (Can be skipped, if a given expression evaluates to false)
   plc4c_s7_read_write_s7_payload* payload = NULL;
-  if((payloadLength) > (0)) {
+  if(((payloadLength) > (0)) && ((parameter) != (NULL))) {
     _res = plc4c_s7_read_write_s7_payload_parse(ctx, readBuffer, messageType, parameter, &payload);
     if(_res != OK) {
       return _res;