Skip to content

Refactor str_buffer, add tests for it.

Michiel Verloop requested to merge strbuf-improvements into develop
  • Add documentation to functions in str_buffer.
  • Add SBUFsubstToken to substitute tokens in the string buffer.
  • Fix the string buffer overflowing when instantiated with a size of 0.
  • Fix SBUFflush not setting a null byte, causing functions like SBUF2str to use the previous contents instead of an empty string.
  • Fix format string encoding errors silently leading to a memory overflow instead of crashing with a useful message.
    • Change CTIerrorInternal to not use PrintMessage to avoid a scenario where errors could potentially occur during error handling.
  • Some debug messages about buffer size now display before attempting to increase it, making debugging easier.
Edited by Michiel Verloop

Merge request reports