confusing multiline messages on the mhttpd messages page

Issue #13 resolved
dd1 created an issue

the mhttpd messages page was changed to show messages in reverse time order (newest first). This broke multi-line messages - they are now shown with all the lines in a reverse order. Multi-line messages were always confusing to read but now it's a complete dog's breakfast. K.O.

Comments (7)

  1. Katie Wildflower

    Sure, now that this bug is on my radar I'll have a look. For future reference, you can CC someone on an issue with an @ before their user name: so instead of saying 'BM', say '@ Bill Mills' - then it might take me less than 3 months to notice :)

  2. Katie Wildflower

    Ok bug identified: the 256 character buffer in show_messages is overflow'd by long messages, because you're using strlcpy to fetch them. Some use of std:string might solve this, working on it now...

  3. Katie Wildflower

    Alright, that's it, one day is all the extra-curricular endurance I have for fiddling with C - this patch works for me, but it follows the path-of-least-resistance example of the million-character malloc'ed buffer in the same function. Both these could be a lot smarter, but at least it no longer breaks.

  4. Log in to comment