From 817f1c6132bf67033644d06685aed840e7c2d94b Mon Sep 17 00:00:00 2001 From: James R <justsomejames2@gmail.com> Date: Wed, 3 Jul 2019 13:25:49 -0700 Subject: [PATCH] Properly display 10+ caret color codes --- srb2query.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srb2query.php b/srb2query.php index 3c521bf..fb68d4d 100644 --- a/srb2query.php +++ b/srb2query.php @@ -643,7 +643,9 @@ class SRB2Query htmlentities(preg_replace('/[\x00-\x19\x7F-\xFF]/', '', str_replace($codes, $alts, $s))) . '</span>'; - for ($i = 0x00; $i <= 0x0F; ++$i) + // Doing this backward for a good reason; so that higher numbers get a + // chance to be matched! + for ($i = 0x0F; $i >= 0x00; --$i) { $s = str_replace($alts[$i], '</span><span style="color:' . $this->colors[$i] . ';">', -- GitLab