From 3cfecc3d3b8fdd821b6de3aba192a1ba732b4193 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Sat, 5 Mar 2022 22:34:42 -0700 Subject: [PATCH] LibPDF: Remove useless hex string substring call --- Userland/Libraries/LibPDF/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibPDF/Parser.cpp b/Userland/Libraries/LibPDF/Parser.cpp index 0894a919db..6efbaee840 100644 --- a/Userland/Libraries/LibPDF/Parser.cpp +++ b/Userland/Libraries/LibPDF/Parser.cpp @@ -730,7 +730,7 @@ NonnullRefPtr Parser::parse_string() if (string.bytes().starts_with(Array { 0xfe, 0xff })) { // The string is encoded in UTF16-BE - string = TextCodec::decoder_for("utf-16be")->to_utf8(string.substring(2)); + string = TextCodec::decoder_for("utf-16be")->to_utf8(string); } else if (string.bytes().starts_with(Array { 239, 187, 191 })) { // The string is encoded in UTF-8. This is the default anyways, but if these bytes // are explicitly included, we have to trim them