Skip to content

Commit

Permalink
2.3.2
Browse files Browse the repository at this point in the history
Fixed a bug where the column bar (-b) was being displayed even when the hex column was hidden (-h)
  • Loading branch information
PQCraft authored Jan 26, 2024
1 parent ac6ad76 commit 86d5820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* */
/*-------------------------------------------------------------------*/

const char* VER = "2.3.1";
const char* VER = "2.3.2";

#ifndef QHD_ASCII
#define QHD_ASCII 0 // Enable/disable 7-bit ASCII mode by default
Expand Down Expand Up @@ -321,7 +321,7 @@ int main(int _argc, char** _argv) {
if (tmp < 16) bread = tmp;
if (bread < 1 && !opt_emptyln) break;
}
if (opt_bar && !pos) {
if (opt_bar && opt_showhex && !pos) {
if (sizeof(long) == 4) {
fputs(" ", stdout);
} else {
Expand All @@ -334,7 +334,6 @@ int main(int _argc, char** _argv) {
setcolor(COLOR_NORM);
putchar('\n');
}
size_t i = 0;
if (opt_showpos) {
putdiv();
setcolor(COLOR_POS);
Expand All @@ -344,6 +343,7 @@ int main(int _argc, char** _argv) {
putdiv();
setcolor(COLOR_HEX);
putchar(' ');
size_t i = 0;
for (; i < bread; ++i) {
if (!buf[i] || buf[i] > 0x7F) {
if (!buf[i]) {
Expand Down

0 comments on commit 86d5820

Please sign in to comment.