X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FChatLog.php;h=2d43b2f08b008e3684e0b9c0ed6fb0532f8194af;hb=5df7f3ed455c56370b3c4b690b0ca47b183fa829;hp=6af158784247045dcd4c6c4a0e0fcdbbbe2f5f9f;hpb=6a1dfa72436b2f5e5b34485da7d7ef1053d89ccc;p=alttp.git diff --git a/app/Models/ChatLog.php b/app/Models/ChatLog.php index 6af1587..2d43b2f 100644 --- a/app/Models/ChatLog.php +++ b/app/Models/ChatLog.php @@ -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); } } }