Skip to content

Commit

Permalink
bugfix for short vs long names
Browse files Browse the repository at this point in the history
  • Loading branch information
slobodan-ilic committed Sep 19, 2024
1 parent aa34cba commit 5fceabb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spss/readstat_sav_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -1703,8 +1703,8 @@ readstat_error_t readstat_parse_sav(readstat_parser_t *parser, const char *path,
metadata.file_label = ctx->file_label;

// Replace short MR names with long names
ck_hash_table_t *var_dict = ck_hash_table_init(1024, 8);
for (size_t i = 0; i < ctx->var_count; i++) {
ck_hash_table_t *var_dict = ck_hash_table_init(ctx->var_index, 8);
for (size_t i = 0; i < ctx->var_index; i++) {
spss_varinfo_t *current_varinfo = ctx->varinfo[i];
if (current_varinfo != NULL && current_varinfo->name[0] != '\0') {
ck_str_hash_insert(current_varinfo->name, current_varinfo, var_dict);
Expand Down

0 comments on commit 5fceabb

Please sign in to comment.