mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-01-02 12:27:09 +08:00
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:
@@ -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);
|
fprintf(outfile, "%s%s", escape_char, escape_char);
|
||||||
col_val += orig_escape_len;
|
col_val += orig_escape_len;
|
||||||
#endif
|
#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++);
|
fprintf(outfile, "\\%03o", *(unsigned char*)col_val++);
|
||||||
else
|
else
|
||||||
putc(*col_val++, outfile);
|
putc(*col_val++, outfile);
|
||||||
|
|||||||
Reference in New Issue
Block a user