From a2bc41368eaec810778008690e527a3444929340 Mon Sep 17 00:00:00 2001 From: William Johnson Date: Fri, 20 Jan 2023 11:28:40 -0800 Subject: [PATCH] Fix N42-2012 RadInstrumentState element not having radInstrumentInformationReference attribute. This is an error pointed out by @arichnad in issue #12. --- src/SpecFile_n42.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SpecFile_n42.cpp b/src/SpecFile_n42.cpp index 33156a2..456107f 100644 --- a/src/SpecFile_n42.cpp +++ b/src/SpecFile_n42.cpp @@ -1467,6 +1467,9 @@ void add_spectra_to_measurement_node_in_2012_N42_xml( ::rapidxml::xml_node xml_node *RadInstrumentState = doc->allocate_node( node_element, "RadInstrumentState" ); RadMeasurement->append_node( RadInstrumentState ); + xml_attribute *att = doc->allocate_attribute( "radInstrumentInformationReference", "InstInfo1", 33, 9 ); + RadInstrumentState->append_attribute( att ); + instrument_state->add_to_n42_2012( RadInstrumentState, doc ); }//if( instrument_state ) @@ -3371,7 +3374,7 @@ struct N42DecodeHelper2012 char buffer[512]; snprintf( buffer, sizeof(buffer), "Failed to parse : '%s'.", e.what() ); log_developer_error( __func__, buffer ); - assert( !node || XML_FIRST_INODE(node, "Remark") ); // The remark will say something like "InterSpec could not determine detector state" + // assert( !node || XML_FIRST_INODE(node, "Remark") ); // The remark will say something like "InterSpec could not determine detector state" #endif }