From 9ac7d4e0dfcb1f3e88e6a5744a35f8482c92c425 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sat, 16 Jun 2018 17:01:47 +0100 Subject: [PATCH] Fix typo for big-endian BOM --- yggdrasil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yggdrasil.go b/yggdrasil.go index 233ad9bd..d29c65b7 100644 --- a/yggdrasil.go +++ b/yggdrasil.go @@ -117,7 +117,7 @@ func main() { // of it - remove it and decode back down into UTF-8. This is necessary // because hjson doesn't know what to do with UTF-16 and will panic if bytes.Compare(config[0:2], []byte{0xFF, 0xFE}) == 0 || - bytes.Compare(config[0:2], []byte{0xFF, 0xFF}) == 0 { + bytes.Compare(config[0:2], []byte{0xFE, 0xFF}) == 0 { utf := unicode.UTF16(unicode.BigEndian, unicode.UseBOM) decoder := utf.NewDecoder() config, err = decoder.Bytes(config)