diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/build.c b/src/build.c index 15430fd28..fa82d56cc 100644 --- a/src/build.c +++ b/src/build.c @@ -1452,10 +1452,10 @@ static void identPut(char *z, int *pIdx, char *zSignedIdent){ for(j=0; zIdent[j]; j++){ if( !sqlite3Isalnum(zIdent[j]) && zIdent[j]!='_' ) break; } - needQuote = sqlite3Isdigit(zIdent[0]) || sqlite3KeywordCode(zIdent, j)!=TK_ID; - if( !needQuote ){ - needQuote = zIdent[j]; - } + needQuote = sqlite3Isdigit(zIdent[0]) + || sqlite3KeywordCode(zIdent, j)!=TK_ID + || zIdent[j]!=0 + || j==0; if( needQuote ) z[i++] = '"'; for(j=0; zIdent[j]; j++){ |