Skip to content

Commit

Permalink
SAV writer: Missing ranges for all numeric types
Browse files Browse the repository at this point in the history
Closes #251
  • Loading branch information
evanmiller committed Aug 4, 2021
1 parent d516372 commit 59dcb3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spss/readstat_sav_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static int sav_n_missing_string_values(readstat_variable_t *r_variable) {

static readstat_error_t sav_n_missing_values(int *out_n_missing_values, readstat_variable_t *r_variable) {
int n_missing_values = 0;
if (r_variable->type == READSTAT_TYPE_DOUBLE) {
if (readstat_variable_get_type_class(r_variable) == READSTAT_TYPE_CLASS_NUMERIC) {
n_missing_values = sav_n_missing_double_values(r_variable);
} else if (readstat_variable_get_storage_width(r_variable) <= 8) {
n_missing_values = sav_n_missing_string_values(r_variable);
Expand Down Expand Up @@ -344,7 +344,7 @@ static readstat_error_t sav_emit_variable_missing_double_values(readstat_writer_
}

static readstat_error_t sav_emit_variable_missing_values(readstat_writer_t *writer, readstat_variable_t *r_variable) {
if (r_variable->type == READSTAT_TYPE_DOUBLE) {
if (readstat_variable_get_type_class(r_variable) == READSTAT_TYPE_CLASS_NUMERIC) {
return sav_emit_variable_missing_double_values(writer, r_variable);
} else if (readstat_variable_get_storage_width(r_variable) <= 8) {
return sav_emit_variable_missing_string_values(writer, r_variable);
Expand Down

0 comments on commit 59dcb3e

Please sign in to comment.