Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/snaplib/snapdata/stnrecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,13 @@ int read_station_recode_definition( stn_recode_map *stt, char *def, char *basefi
}
else if ( _stricmp(field,"file") == 0 )
{
// "recode file <recodefile>" is a distinct grammar from the other
// two forms below, and shares none of their optional uncertainty or
// date-range clauses etc. - the recode file's own columns are all it
// supports. read_station_recode_file has already applied every
// recode from the file by the time it returns, so this branch returns
// immediately rather than falling into logic that assumes codefrom
// and codeto are set.
char *filename=next_field(&def);
int sts;
if( ! filename )
Expand All @@ -459,6 +466,11 @@ int read_station_recode_definition( stn_recode_map *stt, char *def, char *basefi
ok=0;
}
}
if( ! ok )
{
handle_error(INVALID_DATA,"Error reading station recoding",msg);
}
return ok ? OK : INVALID_DATA;
}
else if ( _stricmp(field,"suffix") == 0 )
{
Expand Down
Loading