Skip to content

Commit 4d04bf4

Browse files
committed
update(src): Use const char* instead of string object
1 parent 8d40e3b commit 4d04bf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scripting/network/database.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ void Query(IDatabase* db, std::string query, EValue callback, EContext* L)
1717
if (databaseRequestsQueue.isTable())
1818
databaseRequestsQueue.setProperty(uuid, EValue(callback));
1919

20+
const char* nq = (const char*)(strdup(query.c_str()));
21+
if (!nq) return;
22+
2023
DatabaseQueryQueue queue = {
21-
query,
24+
nq,
2225
uuid,
2326
};
2427
db->AddQueryQueue(queue);

0 commit comments

Comments
 (0)