Skip to content

Commit 5c44678

Browse files
authored
Read format_width and format_digits for 32-bit files (#364)
Tested using a file created on Windows (WINDOWS_64).
1 parent 365c743 commit 5c44678

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/sas/readstat_sas7bdat_read.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ static readstat_error_t sas7bdat_parse_column_format_subheader(const char *subhe
380380
if (ctx->u64) {
381381
ctx->col_info[ctx->col_formats_count-1].format_width = sas_read2(&subheader[24], ctx->bswap);
382382
ctx->col_info[ctx->col_formats_count-1].format_digits = sas_read2(&subheader[26], ctx->bswap);
383+
} else {
384+
ctx->col_info[ctx->col_formats_count-1].format_width = sas_read2(&subheader[12], ctx->bswap);
385+
ctx->col_info[ctx->col_formats_count-1].format_digits = sas_read2(&subheader[14], ctx->bswap);
383386
}
384387
ctx->col_info[ctx->col_formats_count-1].format_ref = sas7bdat_parse_text_ref(
385388
ctx->u64 ? &subheader[46] : &subheader[34], ctx);

0 commit comments

Comments
 (0)