Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
I really have zero idea how this line worked how it previous was. Must
have been some incredible luck.
  • Loading branch information
paked committed Mar 17, 2019
1 parent 21c871d commit 28dc870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ bool table_get(Table* t, String key, Value* v) {
continue;
}

if (key.len == entry.key.len && hash == entry.hash && strncpy(key.str, entry.key.str, key.len)) {
if (key.len == entry.key.len && hash == entry.hash && strncmp(key.str, entry.key.str, key.len) == 0) {
if (v != 0) {
*v = t->entries[i].val;
}
Expand Down

0 comments on commit 28dc870

Please sign in to comment.