aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-11-02 08:56:35 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-11-02 09:02:41 +0100
commit5cbc7a5ca52bbe0e1d8b7f29dbe06117e2eb5285 (patch)
treeea0fb929d836bd76e1a4059ee3abcb59aa1ff005 /build-aux
parenta95ec833dc3d197590211b47f360f7cab006a64d (diff)
downloadexternal_libqmi-5cbc7a5ca52bbe0e1d8b7f29dbe06117e2eb5285.zip
external_libqmi-5cbc7a5ca52bbe0e1d8b7f29dbe06117e2eb5285.tar.gz
external_libqmi-5cbc7a5ca52bbe0e1d8b7f29dbe06117e2eb5285.tar.bz2
qmi-codegen: fix computation of expected TLV length when using strings
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/qmi-codegen/VariableString.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/build-aux/qmi-codegen/VariableString.py b/build-aux/qmi-codegen/VariableString.py
index db4a915..a127eb7 100644
--- a/build-aux/qmi-codegen/VariableString.py
+++ b/build-aux/qmi-codegen/VariableString.py
@@ -125,7 +125,7 @@ class VariableString(Variable):
'${lp} guint16 aux_buffer_len = ${buffer_len} - ${variable_name};\n'
'\n'
'${lp} qmi_utils_read_guint8_from_buffer (&aux_buffer, &aux_buffer_len, &size8);\n'
- '${lp} ${variable_name} = 1 + size8;\n'
+ '${lp} ${variable_name} += (1 + size8);\n'
'${lp}}\n')
elif self.length_prefix_size == 16:
template = (
@@ -135,7 +135,7 @@ class VariableString(Variable):
'${lp} guint16 aux_buffer_len = ${buffer_len} - ${variable_name};\n'
'\n'
'${lp} qmi_utils_read_guint16_from_buffer (&aux_buffer, &aux_buffer_len, QMI_ENDIAN_LITTLE, &size16);\n'
- '${lp} ${variable_name} = 2 + size16;\n'
+ '${lp} ${variable_name} += (2 + size16);\n'
'${lp}}\n')
f.write(string.Template(template).substitute(translations))