1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix a C99-ism and a compiler warning for MSVC.

FossilOrigin-Name: aa53a36ea2eb90cc4939e37e6ad320b4211692fd
This commit is contained in:
drh
2016-06-04 20:58:35 +00:00
parent a7c90c42ea
commit d66c4f809d
4 changed files with 11 additions and 13 deletions

View File

@@ -619,8 +619,9 @@ static int saveCursorKey(BtCursor *pCur){
pCur->nKey = sqlite3BtreeIntegerKey(pCur);
}else{
/* For an index btree, save the complete key content */
void *pKey;
pCur->nKey = sqlite3BtreePayloadSize(pCur);
void *pKey = sqlite3Malloc( pCur->nKey );
pKey = sqlite3Malloc( pCur->nKey );
if( pKey ){
rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey);
if( rc==SQLITE_OK ){