Commit 03c01e03 authored by Jian Li's avatar Jian Li
Browse files

when '.' not found, return the entire text .

If the character '.' is not found, "strrchr" returns a null pointer.
parent fe0d2d83
Pipeline #12780 passed with stage
in 34 minutes and 15 seconds
......@@ -259,8 +259,6 @@ void Connection::removeExt(sqlite3_context* ctx, int argc, sqlite3_value** argv)
const char *ptr = strrchr(z1, '.');
if( ptr )
n = ptr-z1;
else
n = -1;
sqlite3_result_text64(ctx,z1,n,SQLITE_TRANSIENT,SQLITE_UTF8);
}
void Connection::suffixNumber(sqlite3_context* ctx, int argc, sqlite3_value** argv){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment