summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/block_executor.cc
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-11-26 18:29:17 +0100
committerAndrej Rode <mail@andrejro.de>2018-11-27 09:51:56 +0100
commit0733bc4f788c424264d26c1a1f82d831c91b2c15 (patch)
tree88c230e9fdf1cb478703120ce9995bd7bff95a82 /gnuradio-runtime/lib/block_executor.cc
parentdf4e7a85263eb523395ce6bef0b2e7769bd63465 (diff)
runtime: Fix tag propagation
During the fix for long long on 32bit architectures a bug was introduced which lead to offset being multiplied by (mp_rrate + one_half). The correct solution is to multiply with mp_rrate and then add one_half. Fixes #2201
Diffstat (limited to 'gnuradio-runtime/lib/block_executor.cc')
-rw-r--r--gnuradio-runtime/lib/block_executor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/block_executor.cc b/gnuradio-runtime/lib/block_executor.cc
index 5f9552415a..40521e10b5 100644
--- a/gnuradio-runtime/lib/block_executor.cc
+++ b/gnuradio-runtime/lib/block_executor.cc
@@ -147,7 +147,7 @@ namespace gr {
for(t = rtags.begin(); t != rtags.end(); t++) {
tag_t new_tag = *t;
mpz_import(offset.get_mpz_t(), 1, 1, sizeof(new_tag.offset), 0, 0, &new_tag.offset);
- offset *= mp_rrate + one_half;
+ offset = offset * mp_rrate + one_half;
new_tag.offset = offset.get_ui();
for(int o = 0; o < d->noutputs(); o++)
out_buf[o]->add_item_tag(new_tag);
@@ -190,7 +190,7 @@ namespace gr {
for(t = rtags.begin(); t != rtags.end(); t++) {
tag_t new_tag = *t;
mpz_import(offset.get_mpz_t(), 1, 1, sizeof(new_tag.offset), 0, 0, &new_tag.offset);
- offset *= mp_rrate + one_half;
+ offset = offset * mp_rrate + one_half;
new_tag.offset = offset.get_ui();
out_buf->add_item_tag(new_tag);
}