From 82f4d5e2f1bb309f74970807d224997498e47166 Mon Sep 17 00:00:00 2001 From: Sylvain Glaize Date: Thu, 22 Feb 2024 19:36:09 +0100 Subject: [PATCH] Fix type error in back reference length. --- unpletter/unpletter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unpletter/unpletter.cpp b/unpletter/unpletter.cpp index 357c0b7..936952b 100644 --- a/unpletter/unpletter.cpp +++ b/unpletter/unpletter.cpp @@ -28,9 +28,9 @@ public: { if (getBit())// Back reference { - data_type length = getInterlacedEliasGamma() + 1; + int length = getInterlacedEliasGamma() + 1; - if (length == 255 || (dsk2rom_tweak && length == 0)) + if (length == 262143 || (dsk2rom_tweak && length == 131072)) { break; } @@ -86,7 +86,7 @@ public: } std::cout << std::endl; - std::cout << "Output size: " << output.size() << std::endl; + std::cout << "Output size: " << std::dec << static_cast(output.size()) << std::endl; } private: @@ -119,9 +119,9 @@ private: return bit; } - data_type getInterlacedEliasGamma() + int getInterlacedEliasGamma() { - data_type value = 1; + int value = 1; while (getBit()) { value = (value << 1) | getBit();