1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Version 2.0.6 (CVS 291)

FossilOrigin-Name: 8467d84fc6e67bd93051f54338a8f6c9b1711ee1
This commit is contained in:
drh
2001-10-19 16:44:56 +00:00
parent 98808babd3
commit 6a535340bc
16 changed files with 399 additions and 227 deletions

View File

@@ -47,7 +47,7 @@ static int sqlite_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
/* Make sure there is enough space in p->azResult to hold everything
** we need to remember from this invocation of the callback.
*/
if( p->nRow==0 ){
if( p->nRow==0 && argv!=0 ){
p->nColumn = nCol;
need = nCol*2;
}else{
@@ -83,20 +83,22 @@ static int sqlite_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
/* Copy over the row data
*/
for(i=0; i<nCol; i++){
if( argv[i]==0 ){
z = 0;
}else{
z = malloc( strlen(argv[i])+1 );
if( z==0 ){
p->rc = SQLITE_NOMEM;
return 1;
if( argv!=0 ){
for(i=0; i<nCol; i++){
if( argv[i]==0 ){
z = 0;
}else{
z = malloc( strlen(argv[i])+1 );
if( z==0 ){
p->rc = SQLITE_NOMEM;
return 1;
}
strcpy(z, argv[i]);
}
strcpy(z, argv[i]);
p->azResult[p->nData++] = z;
}
p->azResult[p->nData++] = z;
p->nRow++;
}
p->nRow++;
return 0;
}