From 5ff21259fe21ed41a302c3f14887630a920654f6 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sat, 8 Mar 2025 14:48:53 +0000 Subject: [PATCH] Fix concatword FossilOrigin-Name: caec4df75e9c54b7c66522456f6e916a130185f1e33a93284dfb72c0d6c9b8c7 --- src/commands.mm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/commands.mm b/src/commands.mm index ed24d56..6022cb5 100644 --- a/src/commands.mm +++ b/src/commands.mm @@ -222,8 +222,10 @@ execute(OFString *string, bool isDown) cont = *p++ != 0; OFString *c = w[0]; // strip irc-style command prefix - if ([c hasPrefix:@"/"]) + if ([c hasPrefix:@"/"]) { c = [c substringFromIndex:1]; + w[0] = c; + } // empty statement if (c.length == 0) continue; @@ -469,11 +471,7 @@ concat(OFString *s) void concatword(OFString *s) { - // The original used this code which does nothing: - // for (char *a = s, *b = s; *a = *b; b++) - // if (*a != ' ') - // a++; - concat(s); + concat([s stringByReplacingOccurrencesOfString:@" " withString:@""]); } int