Closed taclane closed 7 months ago
That looks much better - thanks!
FWIW - I've noticed that if the signal is bad enough that this message is displayed, most of the variables in that message are just garbage.
FWIW - I've noticed that if the signal is bad enough that this message is displayed, most of the variables in that message are just garbage.
That is my experience too. You almost never see the message when things are working correctly. But the times it does show up probably should not dump random Unicode or unsanitized control characters to console.
After checking back on things, #870 is the correct fix for this issue. Changing the type declaration has unhelpful side-effects.
Debug variables
s0
ands1
inp25_parser.cc
are typed asuint8_t
. When displayed in an iostream, these variables will be presented as a character, not a number, since that type is interpreted as an alias forunsigned char
.This console message can display when conditions are bad or other receiver problems occur, and it does not seem ideal to inject invalid, or random, UTF8 characters into the user's console or log files. Additional examples of this can also be seen in #775.
Using a
uint16_t
orshort
instead should avoid this in the future, and numerically display values for those variables.Edit: An example of a "corrected" parse error message is below: