fix: never use a log message as a format string (#135)
This commit is contained in:
parent
2e79a82f85
commit
4a5e7b58e2
@ -460,13 +460,13 @@ void sd_log_cb(enum sd_log_level_t level, const char* log, void* data) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (level <= SD_LOG_INFO) {
|
if (level <= SD_LOG_INFO) {
|
||||||
fprintf(stdout, log);
|
fputs(log, stdout);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, log);
|
fputs(log, stderr);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
SDParams params;
|
SDParams params;
|
||||||
|
Loading…
Reference in New Issue
Block a user