Skip to content

Commit 337a0c2

Browse files
committed
really use lookup or insert
1 parent b7d126c commit 337a0c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chmatch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static SEXP chmatchMain(SEXP x, SEXP table, int nomatch, bool chin, bool chmatch
5959
int nuniq=0;
6060
for (int i=0; i<tablelen; ++i) {
6161
const SEXP s = td[i];
62-
hash_set(marks, s, chmatchdup ? -(++nuniq) : -i-1); // first time seen this string in table
62+
hash_lookup_or_insert(marks, s, chmatchdup ? -(++nuniq) : -i-1); // first time seen this string in table
6363
}
6464
// in future if we need NAs in x not to be matched to NAs in table ...
6565
if (chmatchdup) {

0 commit comments

Comments
 (0)