Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/spss/readstat_por_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ static readstat_error_t read_missing_value_record(por_ctx_t *ctx) {
}
varinfo = &ctx->varinfo[ctx->var_offset];

if (varinfo->n_missing_values >= 3) {
retval = READSTAT_ERROR_PARSE;
goto cleanup;
}
if (varinfo->type == READSTAT_TYPE_DOUBLE) {
if ((retval = read_double(ctx, &varinfo->missing_double_values[varinfo->n_missing_values])) != READSTAT_OK) {
goto cleanup;
Expand All @@ -382,10 +386,6 @@ static readstat_error_t read_missing_value_record(por_ctx_t *ctx) {
goto cleanup;
}
}
if (varinfo->n_missing_values > 2) {
retval = READSTAT_ERROR_PARSE;
goto cleanup;
}
varinfo->n_missing_values++;

cleanup:
Expand Down