Skip to content

Commit 08236a7

Browse files
hpoettkerevanmiller
authored andcommitted
Fix SAS columns attributes for variable names starting with underscore
1 parent 65d4107 commit 08236a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/sas/readstat_sas7bdat_write.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ static readstat_error_t sas7bdat_add_column_names(readstat_writer_t *writer, sas
602602

603603
static int sas7bdat_name_needs_quoting(const char *name) {
604604
size_t i;
605-
if (!isalpha((unsigned char)name[0]))
605+
if (!isalpha((unsigned char)name[0]) && name[0] != '_')
606606
return 1;
607607
for (i=1; name[i]; i++) {
608608
if (!isalnum((unsigned char)name[i]) && name[i] != '_')

0 commit comments

Comments
 (0)