From c040579e090e3461829e42b62db50d0085b81e5b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 21 Mar 2017 15:11:48 +0000 Subject: [PATCH] Fixed a mistake in spaced command handling Nothing drastic, just a self-defeating line of code. --- src/pocketmine/command/SimpleCommandMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/command/SimpleCommandMap.php b/src/pocketmine/command/SimpleCommandMap.php index 48e30d1ac..566e4d0a1 100644 --- a/src/pocketmine/command/SimpleCommandMap.php +++ b/src/pocketmine/command/SimpleCommandMap.php @@ -188,7 +188,7 @@ class SimpleCommandMap implements CommandMap{ * @return Command|null */ public function matchCommand(string &$commandName, array &$args){ - $count = max(count($args), 255); + $count = min(count($args), 255); for($i = 0; $i < $count; ++$i){ $commandName .= array_shift($args);