mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Fix the ".import" command of the command-line shell so that it ignores
\n and \r at the end of a line. Ticket #939. (CVS 2003) FossilOrigin-Name: dcbf4817a7a3ce18a2d5ed008346933a36acd543
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains code to implement the "sqlite" command line
|
||||
** utility for accessing SQLite databases.
|
||||
**
|
||||
** $Id: shell.c,v 1.114 2004/09/24 12:50:03 drh Exp $
|
||||
** $Id: shell.c,v 1.115 2004/10/06 14:39:07 drh Exp $
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -1039,7 +1039,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
|
||||
i = 0;
|
||||
lineno++;
|
||||
azCol[0] = zLine;
|
||||
for(i=0, z=zLine; *z; z++){
|
||||
for(i=0, z=zLine; *z && *z!='\n' && *z!='\r'; z++){
|
||||
if( *z==p->separator[0] && strncmp(z, p->separator, nSep)==0 ){
|
||||
*z = 0;
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user