diff options
author | ComradeCrow <comradecrow@vivaldi.net> | 2023-05-17 23:35:32 -0700 |
---|---|---|
committer | ComradeCrow <comradecrow@vivaldi.net> | 2023-05-17 23:35:32 -0700 |
commit | fd350c39ce8dab1ebb6bca94abf25e2e782086b3 (patch) | |
tree | ae842571106961a9911777d7b83f1ebea28e6007 /src/sqliteinterface.cpp | |
parent | dd9811703ad623e6b3ddc51e58ef5cc801f41951 (diff) | |
download | ytcpp-fd350c39ce8dab1ebb6bca94abf25e2e782086b3.tar.gz |
hotfix
Diffstat (limited to 'src/sqliteinterface.cpp')
-rw-r--r-- | src/sqliteinterface.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sqliteinterface.cpp b/src/sqliteinterface.cpp index e59fd8a..7cf14dc 100644 --- a/src/sqliteinterface.cpp +++ b/src/sqliteinterface.cpp @@ -69,8 +69,7 @@ void SqliteInterface::createTables() { void SqliteInterface::saveInstance(const char *uri, float health, const char *location) { char *errmsg = 0; - char *sqlExec = sqlite3_mprintf("REPLACE INTO INSTANCES VALUES(%Q, '%.3f', %Q);", uri, health, location); - int rc = sqlite3_exec(db, sqlExec, callback, 0, &errmsg); + int rc = sqlite3_exec(db, sqlite3_mprintf("REPLACE INTO INSTANCES VALUES(%Q, '%.3f', %Q);", uri, health, location), callback, 0, &errmsg); if( rc != SQLITE_OK ){ fprintf(stderr, "SQL error: %s\n", errmsg); sqlite3_free(errmsg); |