]> sigrok.org Git - pulseview.git/blobdiff - pv/views/decoder_output/view.cpp
Fix build for machines that are not 64 bit
[pulseview.git] / pv / views / decoder_output / view.cpp
index 775f6daf92a8d1ebe9b10f56eed98da1b7a25770..325fa716db78bd1800bce41c249770aac009d28a 100644 (file)
@@ -238,14 +238,14 @@ void View::update_data()
        if (!signal_)
                return;
 
-       if (!binary_data_exists_)
-               return;
-
        const DecodeBinaryClass* bin_class =
                signal_->get_binary_data_class(current_segment_, decoder_, bin_class_id_);
 
        hex_view_->set_data(bin_class);
 
+       if (!binary_data_exists_)
+               return;
+
        if (!save_button_->isEnabled())
                save_button_->setEnabled(true);
 }
@@ -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;
                }