diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/util.c b/src/util.c index 4a332a5e9..fd3c858ab 100644 --- a/src/util.c +++ b/src/util.c @@ -1164,10 +1164,6 @@ int sqlite3AbsInt32(int x){ ** If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always ** do the suffix shortening regardless of URI parameter. ** -** Assume that zBaseFilename contains two \000 terminator bytes (so that -** it can be harmlessly passed into sqlite3_uri_parameter()) and copy both -** zero terminator bytes into the end of the revised name. -** ** Examples: ** ** test.db-journal => test.nal @@ -1176,7 +1172,6 @@ int sqlite3AbsInt32(int x){ ** test.db-mj7f3319fa => test.9fa */ void sqlite3FileSuffix3(const char *zBaseFilename, char *z){ - assert( zBaseFilename[strlen(zBaseFilename)+1]==0 ); #if SQLITE_ENABLE_8_3_NAMES<2 if( sqlite3_uri_boolean(zBaseFilename, "8_3_names", 0) ) #endif @@ -1184,7 +1179,7 @@ void sqlite3FileSuffix3(const char *zBaseFilename, char *z){ int i, sz; sz = sqlite3Strlen30(z); for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){} - if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 5); + if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4); } } #endif |