mirror of https://github.com/ecmwf/eccodes.git
ECC-1488: Fortran: Bug in grib_f_get_error_string
This commit is contained in:
parent
d0b4506010
commit
da401ba7b8
|
@ -2170,10 +2170,10 @@ int grib_f_print_(int* gid, char* key, int len){
|
|||
}
|
||||
}
|
||||
int grib_f_print__(int* gid, char* key, int len){
|
||||
return grib_f_print_( gid, key, len);
|
||||
return grib_f_print_(gid, key, len);
|
||||
}
|
||||
int grib_f_print(int* gid, char* key, int len){
|
||||
return grib_f_print_( gid, key, len);
|
||||
return grib_f_print_(gid, key, len);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2181,14 +2181,14 @@ int grib_f_get_error_string_(int* err, char* buf, int len){
|
|||
const char* err_msg = grib_get_error_message(*err);
|
||||
const size_t erlen = strlen(err_msg);
|
||||
if( len < erlen) return GRIB_ARRAY_TOO_SMALL;
|
||||
strncpy(buf, err_msg,(size_t)len);
|
||||
strncpy(buf, err_msg, (size_t)erlen); /* ECC-1488 */
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
int grib_f_get_error_string__(int* err, char* buf, int len){
|
||||
return grib_f_get_error_string_(err,buf,len);
|
||||
int grib_f_get_error_string__(int* err, char* buf, int len){
|
||||
return grib_f_get_error_string_(err, buf, len);
|
||||
}
|
||||
int grib_f_get_error_string(int* err, char* buf, int len){
|
||||
return grib_f_get_error_string_(err,buf,len);
|
||||
int grib_f_get_error_string(int* err, char* buf, int len){
|
||||
return grib_f_get_error_string_(err, buf, len);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue