Respect octal flag in mdb-export brianb/mdbtools#153

The *col_val <= 0 check appears to have been intended to print ASCII
characters as-is. But this is not a good check, and goes against the
documented behavior.
This commit is contained in:
Evan Miller
2020-08-05 13:38:50 -04:00
parent 4a97e00a79
commit cde53c4332

View File

@@ -64,7 +64,7 @@ print_col(FILE *outfile, gchar *col_val, int quote_text, int col_type, int bin_l
fprintf(outfile, "%s%s", escape_char, escape_char);
col_val += orig_escape_len;
#endif
} else if (is_binary_type(col_type) && *col_val <= 0 && bin_mode == MDB_BINEXPORT_OCTAL)
} else if (is_binary_type(col_type) && bin_mode == MDB_BINEXPORT_OCTAL)
fprintf(outfile, "\\%03o", *(unsigned char*)col_val++);
else
putc(*col_val++, outfile);