mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-08 05:23:39 +00:00
[Bug Fix] Fix #parcels add subcommand (#4431)
The parcel object was not be initialized correctly resulting in the possibility of incorrect data being written for the uninitialized members.
This commit is contained in:
1 parent
4c81321847
commit
6903205484
1 file changed
+2
-2
@@ -163,7 +163,7 @@ void command_parcels(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
CharacterParcelsRepository::CharacterParcels parcel_out;
|
||||
auto parcel_out = CharacterParcelsRepository::NewEntity();
|
||||
parcel_out.from_name = c->GetName();
|
||||
parcel_out.note = note;
|
||||
parcel_out.sent_date = time(nullptr);
|
||||
@@ -241,7 +241,7 @@ void command_parcels(Client *c, const Seperator *sep)
|
||||
? inst->GetItem()->MaxCharges : (int16) quantity;
|
||||
}
|
||||
|
||||
CharacterParcelsRepository::CharacterParcels parcel_out;
|
||||
auto parcel_out = CharacterParcelsRepository::NewEntity();
|
||||
parcel_out.from_name = c->GetName();
|
||||
parcel_out.note = note.empty() ? "" : note;
|
||||
parcel_out.sent_date = time(nullptr);
|
||||
|
||||
Reference in new issue
Block a user