Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs when reading big-endian u64 SAS catalog files #293

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

gorcha
Copy link
Contributor

@gorcha gorcha commented Jan 19, 2023

This PR fixes a few bugs when reading big-endian u64 SAS catalog files.

In some cases ReadStat is currently checking a single byte for a value which is actually stored as a 16 bit int, which works fine on little-endian files but returns 0 when a file is big-endian.

The other changes just change the integer size being read from the file - it was incorrect in a few spots but only causes an issue when it's a big-endian file.

From tidyverse/haven#696 - example catalog files at haven_reprex_github.zip. This zip contains the same format file produced by multiple versions of SAS, so I've been working off direct comparisons between the two files.

Thanks!

@evanmiller
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants