qc_sqlite: Handle a name like ``a.

This commit is contained in:
Johan Wikman
2016-09-29 23:48:21 +03:00
parent ca76cb1576
commit fa2a667195
2 changed files with 8 additions and 1 deletions

View File

@ -220,7 +220,13 @@ int sqlite3Dequote(char *z){
for(i=1, j=0;; i++){
assert( z[i] );
#ifdef MAXSCALE
if ( z[i]=='\\' ){
if ( z[i]==0 ){
// TODO: This is needed only because exposed_sqlite3Dequote() is called
// TODO: in qc_sqlite.c:update_names(). That call probably is not needed
// TODO: and should be removed, in which case this check could also be
// TODO: removed.
break;
}else if ( z[i]=='\\' ){
z[j++] = '\\';
if ( z[i+1]==quote || z[i+1]=='\\' ){
z[j++] = quote;