Skip to content

Commit

Permalink
Fix N42-2012 RadInstrumentState element not having radInstrumentInfor…
Browse files Browse the repository at this point in the history
…mationReference attribute.

This is an error pointed out by @arichnad in issue #12.
  • Loading branch information
wcjohns committed Jan 20, 2023
1 parent 053b85e commit a2bc413
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SpecFile_n42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,9 @@ void add_spectra_to_measurement_node_in_2012_N42_xml( ::rapidxml::xml_node<char>
xml_node<char> *RadInstrumentState = doc->allocate_node( node_element, "RadInstrumentState" );
RadMeasurement->append_node( RadInstrumentState );

xml_attribute<char> *att = doc->allocate_attribute( "radInstrumentInformationReference", "InstInfo1", 33, 9 );
RadInstrumentState->append_attribute( att );

instrument_state->add_to_n42_2012( RadInstrumentState, doc );
}//if( instrument_state )

Expand Down Expand Up @@ -3371,7 +3374,7 @@ struct N42DecodeHelper2012
char buffer[512];
snprintf( buffer, sizeof(buffer), "Failed to parse <StateVector>: '%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
}

Expand Down

0 comments on commit a2bc413

Please sign in to comment.