Skip to content

Commit

Permalink
segfault in do_makevector
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/branches/R-0-61-patches@824 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
pd committed Mar 3, 1998
1 parent da99e25 commit ce0a6d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/builtin.c
Expand Up @@ -366,6 +366,8 @@ SEXP do_makevector(SEXP call, SEXP op, SEXP args, SEXP rho)

len = asInteger(CADR(args));
s = coerceVector(CAR(args), STRSXP);
if (length(s) == 0)
error("vector: zero-length type argument\n");
mode = str2type(CHAR(STRING(s)[0]));
if (mode == -1 && streql(CHAR(STRING(s)[0]), "double"))
mode = REALSXP;
Expand Down

0 comments on commit ce0a6d2

Please sign in to comment.