DecodeBinaryClass* bin_class = nullptr;
for (DecodeBinaryClass& bc : segment->binary_classes)
- if ((bc.decoder->decoder() == decc) && (bc.info->bin_class_id == pdb->bin_class))
+ if ((bc.decoder->decoder() == decc) && (bc.info->bin_class_id == (uint32_t)pdb->bin_class))
bin_class = &bc;
if (!bin_class) {
{
current_chunk_id_ = 0;
current_chunk_offset_ = 0;
+ current_offset_ = offset;
for (const DecodeBinaryDataChunk& chunk : data_->chunks)
if (offset >= chunk.data.size()) {
uint8_t v = current_chunk_->data[current_chunk_offset_];
+ current_offset_++;
current_chunk_offset_++;
+
if (current_chunk_offset_ == current_chunk_->data.size()) {
current_chunk_id_++;
current_chunk_offset_ = 0;
for (size_t lineIdx = firstLineIdx, y = yStart; lineIdx < lastLineIdx; lineIdx++) {
int x = posHex_;
- for (size_t i = 0; i < BYTES_PER_LINE && ((lineIdx - firstLineIdx) * BYTES_PER_LINE + i) < data_size_; i++) {
+ for (size_t i = 0; (i < BYTES_PER_LINE) && (current_offset_ < data_size_); i++) {
size_t pos = (lineIdx * BYTES_PER_LINE + i) * 2;
// Fetch byte
for (size_t lineIdx = firstLineIdx, y = yStart; lineIdx < lastLineIdx; lineIdx++) {
int x = posAscii_;
- for (size_t i = 0; ((lineIdx - firstLineIdx) * BYTES_PER_LINE + i) < data_size_ && (i < BYTES_PER_LINE); i++) {
+ for (size_t i = 0; (i < BYTES_PER_LINE) && (current_offset_ < data_size_); i++) {
// Fetch byte
uint8_t ch = get_next_byte();
size_t charWidth_, charHeight_;
size_t selectBegin_, selectEnd_, selectInit_, cursorPos_;
- size_t current_chunk_id_, current_chunk_offset_;
+ size_t current_chunk_id_, current_chunk_offset_, current_offset_;
const DecodeBinaryDataChunk* current_chunk_;
vector<QColor> chunk_colors_;
uint32_t bin_classes = decoder_->get_binary_class_count();
for (uint32_t i = 0; i < bin_classes; i++) {
const data::decode::DecodeBinaryClassInfo* class_info = decoder_->get_binary_class(i);
- class_selector_->addItem(class_info->name, QVariant::fromValue(i));
+ class_selector_->addItem(class_info->description, QVariant::fromValue(i));
}
connect(signal_, SIGNAL(new_binary_data(unsigned int, void*, unsigned int)),