Skip to content

Format byte output with space between hex values - #28

Closed
JalonWong wants to merge 1 commit into
KangLin:masterfrom
JalonWong:patch-1
Closed

JalonWong wants to merge 1 commit into
KangLin:masterfrom
JalonWong:patch-1

Conversation

@JalonWong

Copy link
Copy Markdown

I think there should be a space after each byte; otherwise, the output from the two sets of data will run together, making it difficult to read.

@KangLin

KangLin commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Thanks for your contribution.

The original code was correct. After your modification, there will be an extra space at the end.

Please upload a screenshot to show your issue.

@JalonWong

Copy link
Copy Markdown
Author

Here is the screenshot of the loopback test case. I'm using v0.5.34, I believe it's the latest.

Screenshot_20260925_182225

@KangLin

KangLin commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Sending the data twice?

Comment thread App/MainWindow.cpp
for(int i = 0; i < nLen; i++)
{
if(i)
szOut += " ";

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? There will be two spaces between the bytes.

@KangLin KangLin Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to

if (i && m_Stats.GetTotalReceives())

@JalonWong

Copy link
Copy Markdown
Author

Yes, twice. So I think the extra space at the end is necessary to separate two sets of data.

KangLin added a commit that referenced this pull request Sep 27, 2026
@KangLin

KangLin commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Please test e78c24e

@JalonWong

Copy link
Copy Markdown
Author

I can't test it recently, but your modification looks good to me. If you think it fixed my issue, you can close my PR.

@KangLin

KangLin commented Sep 29, 2026

Copy link
Copy Markdown
Owner

@JalonWong

Copy link
Copy Markdown
Author

Actually, it got worse. I think the condition you modified should be or instead of and.

image

@KangLin

KangLin commented Sep 29, 2026

Copy link
Copy Markdown
Owner

I can't test it right now, I'll make the changes after the holiday.

KangLin added a commit that referenced this pull request Sep 29, 2026
@KangLin

KangLin commented Sep 29, 2026

Copy link
Copy Markdown
Owner

@JalonWong

Copy link
Copy Markdown
Author

It's working properly now.

KangLin added a commit that referenced this pull request Sep 29, 2026
@KangLin KangLin closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants