outitf.c, restrict vector length to 1, the minimum needed

This commit is contained in:
h_vogt 2017-07-31 07:56:05 +02:00 committed by Holger Vogt
parent 81bd6b7d17
commit ce9f23f7af
1 changed files with 8 additions and 1 deletions

View File

@ -1058,6 +1058,12 @@ plotInit(runDesc *run)
static inline int
vlength2delta(int l)
{
#ifdef SHARED_MODULE
if (savenone)
/* We need just a vector length of 1 */
return 1;
#endif
if (l < 50000)
return 512;
if (l < 200000)
@ -1078,7 +1084,8 @@ plotAddRealValue(dataDesc *desc, double value)
struct dvec *v = desc->vec;
#ifdef SHARED_MODULE
if(savenone)
if (savenone)
/* always save new data to same location */
v->v_length = 0;
#endif