diff --git a/fortran/grib_fortran.c b/fortran/grib_fortran.c index 257260185..f8a3fc08a 100644 --- a/fortran/grib_fortran.c +++ b/fortran/grib_fortran.c @@ -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); } /*****************************************************************************/