]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/ChatLog.php
add up to 4 player support for zsr sync
[alttp.git] / app / Models / ChatLog.php
index 6af158784247045dcd4c6c4a0e0fcdbbbe2f5f9f..2d43b2f08b008e3684e0b9c0ed6fb0532f8194af 100644 (file)
@@ -34,9 +34,7 @@ class ChatLog extends Model {
                                $positions = explode(',', $set[1]);
                                foreach ($positions as $position) {
                                        $coords = explode('-', $position);
-                                       for ($i = intval($coords[0]); $i <= intval($coords[1]); ++$i) {
-                                               $text[$i] = ' ';
-                                       }
+                                       $text = mb_substr($text, 0, $coords[0]).str_repeat(' ', $coords[1] - $coords[0] + 1).mb_substr($text, $coords[1] + 1);
                                }
                        }
                }