Resolve some string related issues for Windows Debug

This commit is contained in:
Jett 2022-12-17 16:03:18 +00:00
parent 631365b7f7
commit 1da2db9db6
3 changed files with 5 additions and 5 deletions

View File

@ -717,7 +717,7 @@ void PropertyManagementComponent::Save() {
insertion->setDouble(9, rotation.y); insertion->setDouble(9, rotation.y);
insertion->setDouble(10, rotation.z); insertion->setDouble(10, rotation.z);
insertion->setDouble(11, rotation.w); insertion->setDouble(11, rotation.w);
insertion->setString(12, "Objects_" + std::to_string(entity->GetLOT()) + "_name"); // Model name. TODO make this customizable insertion->setString(12, ("Objects_" + std::to_string(entity->GetLOT()) + "_name").c_str()); // Model name. TODO make this customizable
insertion->setString(13, ""); // Model description. TODO implement this. insertion->setString(13, ""); // Model description. TODO implement this.
insertion->setDouble(14, 0); // behavior 1. TODO implement this. insertion->setDouble(14, 0); // behavior 1. TODO implement this.
insertion->setDouble(15, 0); // behavior 2. TODO implement this. insertion->setDouble(15, 0); // behavior 2. TODO implement this.

View File

@ -74,12 +74,12 @@ void Mail::SendMail(const LWOOBJID sender, const std::string& senderName, LWOOBJ
auto* ins = Database::CreatePreppedStmt("INSERT INTO `mail`(`sender_id`, `sender_name`, `receiver_id`, `receiver_name`, `time_sent`, `subject`, `body`, `attachment_id`, `attachment_lot`, `attachment_subkey`, `attachment_count`, `was_read`) VALUES (?,?,?,?,?,?,?,?,?,?,?,0)"); auto* ins = Database::CreatePreppedStmt("INSERT INTO `mail`(`sender_id`, `sender_name`, `receiver_id`, `receiver_name`, `time_sent`, `subject`, `body`, `attachment_id`, `attachment_lot`, `attachment_subkey`, `attachment_count`, `was_read`) VALUES (?,?,?,?,?,?,?,?,?,?,?,0)");
ins->setUInt(1, sender); ins->setUInt(1, sender);
ins->setString(2, senderName); ins->setString(2, senderName.c_str());
ins->setUInt(3, recipient); ins->setUInt(3, recipient);
ins->setString(4, recipientName.c_str()); ins->setString(4, recipientName.c_str());
ins->setUInt64(5, time(nullptr)); ins->setUInt64(5, time(nullptr));
ins->setString(6, subject); ins->setString(6, subject.c_str());
ins->setString(7, body); ins->setString(7, body.c_str());
ins->setUInt(8, 0); ins->setUInt(8, 0);
ins->setInt(9, attachment); ins->setInt(9, attachment);
ins->setInt(10, 0); ins->setInt(10, 0);

View File

@ -220,7 +220,7 @@ int main(int argc, char** argv) {
//Create account //Create account
auto* statement = Database::CreatePreppedStmt("INSERT INTO accounts (name, password, ""gm_level) VALUES (?, ?, ?);"); auto* statement = Database::CreatePreppedStmt("INSERT INTO accounts (name, password, ""gm_level) VALUES (?, ?, ?);");
statement->setString(1, username); statement->setString(1, username.c_str());
statement->setString(2, std::string(hash, BCRYPT_HASHSIZE).c_str()); statement->setString(2, std::string(hash, BCRYPT_HASHSIZE).c_str());
statement->setInt(3, 9); statement->setInt(3, 9);