Skip to content

Commit

Permalink
Merge branch 'main' into new-constructor-defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Sep 10, 2024
2 parents f264c39 + a4e8835 commit 65c55d7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/prop.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ static inline
int name_idx(SEXP list, const char* name) {
SEXP names = Rf_getAttrib(list, R_NamesSymbol);

if (TYPEOF(names) == STRSXP)
for (int i = 0, n = Rf_length(names); i < n; i++)
if (TYPEOF(names) == STRSXP) {
for (int i = 0, n = Rf_length(names); i < n; i++) {
if (strcmp(CHAR(STRING_ELT(names, i)), name) == 0)
return i;
return -1;
}
}
return -1;
}

static inline
Expand Down

0 comments on commit 65c55d7

Please sign in to comment.