Verified Commit bf920f1c authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Resolve segfault in autosql in GetReseau

parent c6a01de3
Pipeline #79782 passed with stage
in 15 seconds
......@@ -237,12 +237,12 @@ Reseau& Database::getReseau(int idReseau) const {
throw "Can't select (reseau) !";
Reseau* r = new Reseau(reseau.value("h").toUInt(), reseau.value("l").toUInt());
Reseau* r = new Reseau(reseau.value("l").toUInt(), reseau.value("h").toUInt());
//remplissage du réseau
for(size_t i = 0; i<reseau.value("h").toUInt(); i++)
for(size_t i = 0; i<reseau.value("l").toUInt(); i++)
for(size_t j = 0; j<reseau.value("l").toUInt(); j++)
for(size_t j = 0; j<reseau.value("h").toUInt(); j++)
QSqlQuery cellule(db);
cellule.prepare("SELECT etat FROM Cellules WHERE (reseau = :id AND x = :i AND y = :j)");
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