Make SWITCH argument turn any output off in ex06
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 24 Oct 2024 12:38:33 +0000 (14:38 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 24 Oct 2024 12:38:33 +0000 (14:38 +0200)
ex06/Harl.cpp

index eeb8097a50637f3976267f8b7c0c67f636f49d78..cab6ebef1f68a4a56b5e6b945ff2fdf90b8f1034 100644 (file)
@@ -45,6 +45,8 @@ ssize_t       Harl::get_level_num(std::string level)
        for (ssize_t i(0); i < 4; ++i)
                if (m_levels[i] == level)
                        return (i);
+       if ("SWITCH" == level)
+               return (4);
        return (-1);
 }