Random numbers may be appended to the parsed number: f.ex. "1.2" may be parsed as 1.29 if should_convert_comma is true.
The problem is that the char buf[30]; is never initialised, nor the null terminator is copied from the source string. Doing one of both fixes the issue.
Random numbers may be appended to the parsed number: f.ex. "1.2" may be parsed as 1.29 if should_convert_comma is true.
The problem is that the
char buf[30];
is never initialised, nor the null terminator is copied from the source string. Doing one of both fixes the issue.