-
- Downloads
Revise fix for bug 32178 (spaces at end of log msg).
The loop in the earlier patch would invoke undefined behavior in two ways: First, it would check whether it was looking at a space before it checked whether the pointer was in-range. Second, it would let a pointer reach a position _before_ the start of a string, which is not allowed. I've removed the assertion about empty messages: empty messages can be their own warning IMO. I've also added tests for this formatting code, to make sure it actually works.
Showing
- changes/ticket32178 1 addition, 1 deletionchanges/ticket32178
- src/feature/control/control_events.c 22 additions, 14 deletionssrc/feature/control/control_events.c
- src/feature/control/control_events.h 2 additions, 0 deletionssrc/feature/control/control_events.h
- src/test/test_controller_events.c 28 additions, 0 deletionssrc/test/test_controller_events.c
Loading
Please register or sign in to comment