summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general
diff options
context:
space:
mode:
authoreb2008-04-30 04:36:05 +0000
committereb2008-04-30 04:36:05 +0000
commitdda0c8ce449e8e387290759c49abd1f38d2c7efb (patch)
tree48ba1e8a45591ae72c150a51b18b0101a7ca198e /gnuradio-core/src/lib/general
parent9d1423b9506c89a51a10b6119d01ce9a82a13b0c (diff)
downloadgnuradio-dda0c8ce449e8e387290759c49abd1f38d2c7efb.tar.gz
gnuradio-dda0c8ce449e8e387290759c49abd1f38d2c7efb.tar.bz2
gnuradio-dda0c8ce449e8e387290759c49abd1f38d2c7efb.zip
Potentially invalid read deferred until it's valid (Dan Halperin)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8296 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r--gnuradio-core/src/lib/general/gr_complex_to_xxx.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc b/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc
index 73435259f..abffa4da1 100644
--- a/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc
+++ b/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2008 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -51,7 +51,7 @@ gr_complex_to_float::work (int noutput_items,
{
const gr_complex *in = (const gr_complex *) input_items[0];
float *out0 = (float *) output_items[0];
- float *out1 = (float *) output_items[1];
+ float* out1;
int noi = noutput_items * d_vlen;
switch (output_items.size ()){
@@ -62,6 +62,7 @@ gr_complex_to_float::work (int noutput_items,
break;
case 2:
+ out1 = (float *) output_items[1];
for (int i = 0; i < noi; i++){
out0[i] = in[i].real ();
out1[i] = in[i].imag ();