summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index 647da81..50126a8 100644
--- a/main.c
+++ b/main.c
@@ -308,8 +308,8 @@ int main(void) {
}
struct string source;
- if (full_msg.data[0] == ':') {
- source.data = full_msg.data + 1;
+ if (full_msg.data[offset] == ':') {
+ source.data = full_msg.data + 1 + offset;
found = 0;
for (uint64_t i = offset + 1; i < msg_len; i++) {
if (full_msg.data[i] == ' ') {
@@ -325,7 +325,6 @@ int main(void) {
}
} else {
source = (struct string){0};
- offset = 0;
}
while (offset < msg_len && full_msg.data[offset] == ' ')