mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Always use "(char*)0" to terminate the argument list of sqliteSetString().
This is needed for 64-bit systems that use a 32-bit integer by default. (CVS 1126) FossilOrigin-Name: 656c90387a4a714b4f31040ece9b0e15e30934af
This commit is contained in:
12
src/os.c
12
src/os.c
@@ -1564,10 +1564,11 @@ char *sqliteOsFullPathname(const char *zRelative){
|
||||
#if OS_UNIX
|
||||
char *zFull = 0;
|
||||
if( zRelative[0]=='/' ){
|
||||
sqliteSetString(&zFull, zRelative, 0);
|
||||
sqliteSetString(&zFull, zRelative, (char*)0);
|
||||
}else{
|
||||
char zBuf[5000];
|
||||
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), "/", zRelative, 0);
|
||||
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), "/", zRelative,
|
||||
(char*)0);
|
||||
}
|
||||
return zFull;
|
||||
#endif
|
||||
@@ -1585,13 +1586,14 @@ char *sqliteOsFullPathname(const char *zRelative){
|
||||
char *zFull = 0;
|
||||
if( zRelative[0]==':' ){
|
||||
char zBuf[_MAX_PATH+1];
|
||||
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), &(zRelative[1]), 0);
|
||||
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), &(zRelative[1]),
|
||||
(char*)0);
|
||||
}else{
|
||||
if( strchr(zRelative, ':') ){
|
||||
sqliteSetString(&zFull, zRelative, 0);
|
||||
sqliteSetString(&zFull, zRelative, (char*)0);
|
||||
}else{
|
||||
char zBuf[_MAX_PATH+1];
|
||||
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), zRelative, 0);
|
||||
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), zRelative, (char*)0);
|
||||
}
|
||||
}
|
||||
return zFull;
|
||||
|
Reference in New Issue
Block a user