Commit 86d05d81 authored by Pau Espin Pedrol's avatar Pau Espin Pedrol
Browse files

CommonDefs.ttcn: Fix compilation errors

Fix compilation errors building with titan 9.0.0:
CommonDefs.ttcn:1298.12-23: error: Reference to a value was expected instead of template variable `v_Substring1'
CommonDefs.ttcn:1298.12-31: In the right operand of operation `&':
CommonDefs.ttcn:1298.27-31: error: Reference to a value was expected instead of template parameter `p_Bit'
CommonDefs.ttcn:1298.12-46: In the right operand of operation `&':
CommonDefs.ttcn:1298.35-46: error: Reference to a value was expected instead of template variable `v_Substring2'
parent 2b3d98ba
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1285,8 +1285,8 @@ module CommonDefs {
                                      template (present) B1_Type p_Bit) return template (present) bitstring
  { /* ES 201 873-1 clause 15.6.1 does not allow index notation */
    /* p_Bitstring needs to be a bitstring with well-defined length (i.e. allowing lengthof(p_Bitstring)) */
    var template (present) bitstring v_Substring1;
    var template (present) bitstring v_Substring2;
    var bitstring v_Substring1;
    var bitstring v_Substring2;
    var integer v_Length := lengthof(p_Bitstring);

    if (p_Position >= v_Length) {
@@ -1295,7 +1295,7 @@ module CommonDefs {
    v_Substring1 := substr(p_Bitstring, 0, p_Position);
    v_Substring2 := substr(p_Bitstring, p_Position + 1, v_Length - p_Position - 1);

    return v_Substring1 & p_Bit & v_Substring2;
    return v_Substring1 & valueof(p_Bit) & v_Substring2;
  }

  //----------------------------------------------------------------------------