[Rd] Minor bug in error message in datetime.c

Oleh Khoma okhom@ @end|ng |rom gm@||@com
Mon Jan 20 16:34:05 CET 2020


I have spotted a minor bug in do_strptime() function. Here is a patch:

--- a/src/main/datetime.c

+++ b/src/main/datetime.c

@@ -1048,7 +1048,7 @@ SEXP attribute_hidden do_strptime(SEXP call, SEXP op, SEXP args, SEXP env)

     if(!isString((x = CAR(args))))

        error(_("invalid '%s' argument"), "x");

     if(!isString((sformat = CADR(args))) || XLENGTH(sformat) == 0)

-       error(_("invalid '%s' argument"), "x");

+       error(_("invalid '%s' argument"), "format");

One could spend quite some time figuring out what is wrong with his “x”, when the problem is with “format” :)

Kind regards,

Oleh Khoma

	[[alternative HTML version deleted]]

More information about the R-devel mailing list