Commit 87921f73 authored by Ghislain MARY's avatar Ghislain MARY

Fix invalid cast when using MySQL as database backend.

parent 25d05ede
......@@ -2466,10 +2466,7 @@ list<shared_ptr<AbstractChatRoom>> MainDb::getChatRooms () const {
soci::rowset<soci::row> rows = (session->prepare << query, soci::use(participantId));
for (const auto &row : rows) {
shared_ptr<ParticipantDevice> device = dParticipant->addDevice(IdentityAddress(row.get<string>(0)));
device->setState(ParticipantDevice::State(getBackend() == Backend::Mysql
? row.get<unsigned int>(1, 0)
: static_cast<unsigned int>(row.get<int>(1, 0))
));
device->setState(ParticipantDevice::State(static_cast<unsigned int>(row.get<int>(1, 0))));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment