aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlarrybr <larrybr@noemail.net>2023-05-02 18:03:25 +0000
committerlarrybr <larrybr@noemail.net>2023-05-02 18:03:25 +0000
commit8594f02c5d9ba5385f0230267002b7b38bac3350 (patch)
tree1e9d1f250ee1e80d0533aef3d012383adaafa099 /src
parentbdb40cb18f725c17b91ba133fa51ecf15f82544c (diff)
downloadsqlite-8594f02c5d9ba5385f0230267002b7b38bac3350.tar.gz
sqlite-8594f02c5d9ba5385f0230267002b7b38bac3350.zip
Cure CLI hang on .import with high-ASCII column separator.
FossilOrigin-Name: aac8ac631de5c5b439c48c13f5fd271d76c11b1a5fd0919dfe4506ef7725f5ab
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index 8e37bac18..3fcd3e4a5 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -5834,8 +5834,8 @@ static void import_append_char(ImportCtx *p, int c){
*/
static char *SQLITE_CDECL csv_read_one_field(ImportCtx *p){
int c;
- int cSep = p->cColSep;
- int rSep = p->cRowSep;
+ int cSep = (u8)p->cColSep;
+ int rSep = (u8)p->cRowSep;
p->n = 0;
c = fgetc(p->in);
if( c==EOF || seenInterrupt ){
@@ -5924,8 +5924,8 @@ static char *SQLITE_CDECL csv_read_one_field(ImportCtx *p){
*/
static char *SQLITE_CDECL ascii_read_one_field(ImportCtx *p){
int c;
- int cSep = p->cColSep;
- int rSep = p->cRowSep;
+ int cSep = (u8)p->cColSep;
+ int rSep = (u8)p->cRowSep;
p->n = 0;
c = fgetc(p->in);
if( c==EOF || seenInterrupt ){
@@ -8806,8 +8806,8 @@ static int do_meta_command(char *zLine, ShellState *p){
" for import\n");
goto meta_command_exit;
}
- sCtx.cColSep = p->colSeparator[0];
- sCtx.cRowSep = p->rowSeparator[0];
+ sCtx.cColSep = (u8)p->colSeparator[0];
+ sCtx.cRowSep = (u8)p->rowSeparator[0];
}
sCtx.zFile = zFile;
sCtx.nLine = 1;