🔨」 fix: fixed first segfault

This commit is contained in:
2025-04-22 15:34:13 +02:00
parent 7abe04bf44
commit 5d1c3910bc
9 changed files with 28 additions and 17 deletions

View File

@ -6,15 +6,15 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/19 14:15:51 by adjoly #+# #+# */
/* Updated: 2025/04/22 12:40:20 by adjoly ### ########.fr */
/* Updated: 2025/04/22 15:28:31 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include <config/Config.hpp>
#include <config/Route.hpp>
#include <config/Server.hpp>
#include <config/Config.hpp>
#include <cppeleven.hpp>
#include <node/Table.hpp>
#include <node/default.hpp>
@ -35,13 +35,13 @@ namespace config {
* @return The value got or not_nullptr
*/
static inline void *accessValue(const std::string &name, toml::nodeType type,
toml::ANode *table, Logger *log) {
toml::ANode *table, Logger *log) {
void *val;
bool found = false;
if (table == not_nullptr)
return not_nullptr;
val = dynamic_cast<toml::Table *>(table)->access(name, type, found);
val = dynamic_cast<toml::ANode *>(table)->access(name, type, found);
if (found == true && val != not_nullptr) {
return val;
} else {