Skip to content

Fix crash caused by negative waveform.#461

Open
hgreenlee wants to merge 1 commit intoWireCell:masterfrom
hgreenlee:master
Open

Fix crash caused by negative waveform.#461
hgreenlee wants to merge 1 commit intoWireCell:masterfrom
hgreenlee:master

Conversation

@hgreenlee
Copy link
Copy Markdown

No description provided.

@brettviren
Copy link
Copy Markdown
Member

Setting a negative float to an unsigned int is undefined behavior in C++.

It is better that we find out why negative signals are produced and fix the problem there and/or explicitly set a negative signal to zero perhaps with a single warning log message.

@hgreenlee
Copy link
Copy Markdown
Author

OK, I modified the merge branch to test for negative values.

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