Fix build for machines that are not 64 bit
authorSoeren Apel <soeren@apelpie.net>
Thu, 26 Dec 2019 23:20:37 +0000 (00:20 +0100)
committerSoeren Apel <soeren@apelpie.net>
Thu, 26 Dec 2019 23:20:37 +0000 (00:20 +0100)
pv/views/decoder_output/view.cpp

index c6d80d16e3dee9aa7feca83b9d63c396b12156a1..325fa716db78bd1800bce41c249770aac009d28a 100644 (file)
@@ -316,11 +316,11 @@ void View::save_data_as_hex_dump(bool with_offset, bool with_ascii) const
                QTextStream out_stream(&file);
 
                uint64_t offset = selection.first;
-               unsigned int n = hex_view_->get_bytes_per_line();
+               uint64_t n = hex_view_->get_bytes_per_line();
                QString s;
 
                while (offset < selection.second) {
-                       size_t end = std::min(selection.second, offset + n);
+                       size_t end = std::min((uint64_t)(selection.second), offset + n);
                        offset = hex_view_->create_hex_line(offset, end, &s, with_offset, with_ascii);
                        out_stream << s << endl;
                }