From 06b2304ba3b6e97e3c6b564ff86af09c8bebdd23 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 23 Jun 2025 12:54:23 +0200 Subject: [PATCH] fix(cmd/mode): checking on empty args --- sources/commands/modes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/commands/modes.cpp b/sources/commands/modes.cpp index d5175e5..8e46b34 100644 --- a/sources/commands/modes.cpp +++ b/sources/commands/modes.cpp @@ -6,7 +6,7 @@ /* By: sben-tay +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/24 17:29:48 by rparodi #+# #+# */ -/* Updated: 2025/06/19 14:02:08 by rparodi ### ########.fr */ +/* Updated: 2025/06/23 12:52:33 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -62,7 +62,7 @@ void Mode::checkMode() { default : break; } - if ((this->_mode.back().first == CHAN_SET_KEY || this->_mode.back().first == CHAN_SET_LIMIT || this->_mode.back().first == CHAN_SET_OP) && argIndex < _args.size()) + if ((tmp == CHAN_SET_KEY || tmp == CHAN_SET_LIMIT || tmp == CHAN_SET_OP) && argIndex < _args.size()) m.arguments = _args[argIndex++]; this->_mode.push_back(std::make_pair(tmp, m)); }