aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/csv.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-12-26 12:50:47 +0000
committerdrh <drh@noemail.net>2018-12-26 12:50:47 +0000
commit8625221444d4f70965d41d241ed7fecc2d8bf7bc (patch)
tree209f91dc82355d3ff7117399fd02b77b311678be /ext/misc/csv.c
parente4c26c41b4e8e5b047f620c8c51282b869ea21a2 (diff)
downloadsqlite-8625221444d4f70965d41d241ed7fecc2d8bf7bc.tar.gz
sqlite-8625221444d4f70965d41d241ed7fecc2d8bf7bc.zip
Fix a problem with the CSV extension when it uses the "header" option on
a real file. FossilOrigin-Name: 7acaed08f946633fca3ab8434dd6349ea6f1bac4fd9ec21f476db013ee06de30
Diffstat (limited to 'ext/misc/csv.c')
-rw-r--r--ext/misc/csv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/misc/csv.c b/ext/misc/csv.c
index 8cca8aeb4..963e41cfe 100644
--- a/ext/misc/csv.c
+++ b/ext/misc/csv.c
@@ -621,7 +621,7 @@ static int csvtabConnect(
}else if( pNew->zData ){
pNew->iStart = (int)sRdr.iIn;
}else{
- pNew->iStart = ftell(sRdr.in);
+ pNew->iStart = ftell(sRdr.in) - sRdr.nIn + sRdr.iIn;
}
csv_reader_reset(&sRdr);
rc = sqlite3_declare_vtab(db, CSV_SCHEMA);