mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
Bug Fix: App crashes on IRC command when no param is provided
This commit is contained in:
@@ -622,9 +622,16 @@
|
||||
if ([string hasPrefix:kCmdJoinRoom])
|
||||
{
|
||||
// Join a room
|
||||
NSString *roomAlias = [string substringFromIndex:kCmdJoinRoom.length + 1];
|
||||
// Remove white space from both ends
|
||||
roomAlias = [roomAlias stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||
NSString *roomAlias;
|
||||
|
||||
// Sanity check
|
||||
if (string.length > kCmdJoinRoom.length)
|
||||
{
|
||||
roomAlias = [string substringFromIndex:kCmdJoinRoom.length + 1];
|
||||
|
||||
// Remove white space from both ends
|
||||
roomAlias = [roomAlias stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||
}
|
||||
|
||||
// Check
|
||||
if (roomAlias.length)
|
||||
|
||||
Reference in New Issue
Block a user