From e59075e7c8730824007e341e5c3d65de8c7ab3fb Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Sun, 25 Feb 2018 04:23:12 +0100
Subject: [PATCH] =?UTF-8?q?Fixes=20an=20issue=20where=20Hex=20colors=20wer?=
 =?UTF-8?q?en=E2=80=99t=20properly=20serialzed?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- previously, the full ARGB was serialized, even though only RGB is
  supported
---
 .../quasseldroid_ng/util/irc/format/IrcFormatSerializer.kt      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatSerializer.kt b/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatSerializer.kt
index 0ed1ef3b0..c2b7ddf99 100644
--- a/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatSerializer.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatSerializer.kt
@@ -100,7 +100,7 @@ class IrcFormatSerializer internal constructor(private val context: Context) {
     fun writeHexColor(foreground: Int?) {
       out.append(CODE_HEXCOLOR)
       if (foreground != null) {
-        out.append(String.format(Locale.US, "%06x", foreground))
+        out.append(String.format(Locale.US, "%06x", foreground and 0x00FFFFFF))
       }
     }
 
-- 
GitLab