diff options
author | Test_User <hax@andrewyu.org> | 2024-10-29 00:20:43 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-10-29 00:37:05 -0400 |
commit | 44c8b93d417cf23580000406f11350ca7e8b52fc (patch) | |
tree | 8d9239b03e7471c4d93f61197c88ec0a66a2da0b | |
parent | Fix some header inclusions (diff) | |
download | haxircd-master.tar.gz haxircd-master.zip |
-rw-r--r-- | protocols/inspircd2.c | 8 | ||||
-rw-r--r-- | protocols/inspircd3.c | 8 | ||||
-rw-r--r-- | protocols/inspircd4.c | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/protocols/inspircd2.c b/protocols/inspircd2.c index 263f475..4a59c10 100644 --- a/protocols/inspircd2.c +++ b/protocols/inspircd2.c @@ -364,16 +364,14 @@ void * inspircd2_protocol_connection(void *type) { size_t argc = 0; size_t old_offset = offset; while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } diff --git a/protocols/inspircd3.c b/protocols/inspircd3.c index 258767e..8f92fb8 100644 --- a/protocols/inspircd3.c +++ b/protocols/inspircd3.c @@ -353,16 +353,14 @@ void * inspircd3_protocol_connection(void *type) { size_t argc = 0; size_t old_offset = offset; while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } diff --git a/protocols/inspircd4.c b/protocols/inspircd4.c index 8835b38..74f8a73 100644 --- a/protocols/inspircd4.c +++ b/protocols/inspircd4.c @@ -354,16 +354,14 @@ void * inspircd4_protocol_connection(void *type) { size_t argc = 0; size_t old_offset = offset; while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } |