Commit a99e2641 authored by Robert Karlsson's avatar Robert Karlsson

Bug fixes

parent 22fa20be
...@@ -383,17 +383,19 @@ int GsdmlDataReader::tag_attribute( const char *name, const char *value) ...@@ -383,17 +383,19 @@ int GsdmlDataReader::tag_attribute( const char *name, const char *value)
switch ( current_tag) { switch ( current_tag) {
case gsdmldata_eTag_PnDevice: case gsdmldata_eTag_PnDevice:
if ( strcmp( name, "GsdmlFile") == 0) { if ( strcmp( name, "GsdmlFile") == 0) {
// Check that the GSDML file is not changed if ( strcmp( data->gsdmlfile, "") != 0) {
char *gsdmlfile_p; // Check that the GSDML file is not changed
char *gsdmlfile_p;
// Print name of gsdmlfile, not path // Print name of gsdmlfile, not path
if ( (gsdmlfile_p = strrchr(data->gsdmlfile, '/'))) if ( (gsdmlfile_p = strrchr(data->gsdmlfile, '/')))
gsdmlfile_p++; gsdmlfile_p++;
else else
gsdmlfile_p = data->gsdmlfile; gsdmlfile_p = data->gsdmlfile;
if ( strcmp( value, gsdmlfile_p) != 0) if ( strcmp( value, gsdmlfile_p) != 0)
return PB__GSDMLFILEMISMATCH; return PB__GSDMLFILEMISMATCH;
}
} }
else if ( strcmp( name, "DeviceText") == 0) else if ( strcmp( name, "DeviceText") == 0)
strncpy( data->device_text, value, sizeof(data->device_text)); strncpy( data->device_text, value, sizeof(data->device_text));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment