Fix concatword

FossilOrigin-Name: caec4df75e9c54b7c66522456f6e916a130185f1e33a93284dfb72c0d6c9b8c7
This commit is contained in:
Jonathan Schleifer 2025-03-08 14:48:53 +00:00
parent f01d1163c4
commit 5ff21259fe

View file

@ -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