diff --git a/core/xml_result.cpp b/core/xml_result.cpp index d1e53b9..f0ca3b1 100644 --- a/core/xml_result.cpp +++ b/core/xml_result.cpp @@ -612,12 +612,15 @@ int xml_result_writer::write_adcdata_formated(FILE* out, const std::string& form } int xml_result_writer::write_adcdata_base64(FILE* out, const adc_result* res) const { + xercesc::XMLPlatformUtils::Initialize(); fprintf(out,"\n",res->samples,res->sampling_frequency, res->nchannels); unsigned int base64length=0; XMLByte* base64buffer=xercesc::Base64::encode( reinterpret_cast(res->data), res->samples*res->nchannels*sizeof(short int), - reinterpret_cast(&base64length) ); + reinterpret_cast(&base64length), + xercesc::XMLPlatformUtils::fgMemoryManager ); fwrite(base64buffer,1,base64length,out); fprintf(out,"\n"); + xercesc::XMLPlatformUtils::fgMemoryManager->deallocate(base64buffer); return 0; } diff --git a/drivers/PTS-Synthesizer/PTS.cpp b/drivers/PTS-Synthesizer/PTS.cpp index 85d9781..fca877b 100644 --- a/drivers/PTS-Synthesizer/PTS.cpp +++ b/drivers/PTS-Synthesizer/PTS.cpp @@ -44,7 +44,7 @@ void PTS::phase_add_ttls(state& the_state, double p) const { std::vector::const_iterator mask=ttl_masks.begin(); while (mask!=ttl_masks.end()) { /* obeye negative logic */ - if ((binary_code & 1<<11)==0 ^ negative_logic==0) the_state.push_back(mask->copy_new()); + if ( ((binary_code & 1<<11)==0) ^ (negative_logic==0)) the_state.push_back(mask->copy_new()); binary_code<<=1; binary_code&=0xFFF; ++mask;