Skip to content

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