summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2022-03-05 22:34:42 -0700
committerAndreas Kling <kling@serenityos.org>2022-03-07 10:53:57 +0100
commit3cfecc3d3b8fdd821b6de3aba192a1ba732b4193 (patch)
tree312d59eab76822871e914e9a332311f75bf5bcc1 /Userland
parente9342183f05f173ad9f35eb2d35f4d3393c5ed62 (diff)
downloadserenity-3cfecc3d3b8fdd821b6de3aba192a1ba732b4193.zip
LibPDF: Remove useless hex string substring call
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibPDF/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
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<StringObject> Parser::parse_string()
if (string.bytes().starts_with(Array<u8, 2> { 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<u8, 3> { 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