diff --git a/library/ColorText.cpp b/library/ColorText.cpp index 5d6e1d82a..2811a7117 100644 --- a/library/ColorText.cpp +++ b/library/ColorText.cpp @@ -125,7 +125,7 @@ void color_ostream::vprinterr(const char *format, va_list args) color_value save = cur_color; if (log_errors_to_stderr) - fprintf(stderr, format, args); + vfprintf(stderr, format, args); color(COLOR_LIGHTRED); vprint(format, args); diff --git a/package/linux/dfhack b/package/linux/dfhack index 3e5a0d803..3f624c2ae 100755 --- a/package/linux/dfhack +++ b/package/linux/dfhack @@ -41,6 +41,7 @@ case "$1" in -g | --gdb) shift echo "set environment LD_PRELOAD=./hack/libdfhack.so" > gdbcmd.tmp + echo "set environment MALLOC_PERTURB_=45" >> gdbcmd.tmp gdb $DF_GDB_OPTS -x gdbcmd.tmp ./libs/Dwarf_Fortress $* rm gdbcmd.tmp ret=$? diff --git a/plugins/workflow.cpp b/plugins/workflow.cpp index 532665c7d..e408df509 100644 --- a/plugins/workflow.cpp +++ b/plugins/workflow.cpp @@ -500,7 +500,7 @@ static bool recover_job(color_ostream &out, ProtectedJob *pj) pj->holder = df::building::find(pj->building_id); if (!pj->holder) { - out.printerr("Forgetting job %d (%s): holder building lost.", + out.printerr("Forgetting job %d (%s): holder building lost.\n", pj->id, ENUM_KEY_STR(job_type, pj->job_copy->job_type).c_str()); forget_job(out, pj); return true; @@ -509,7 +509,7 @@ static bool recover_job(color_ostream &out, ProtectedJob *pj) // Check its state and postpone or cancel if invalid if (pj->holder->jobs.size() >= 10) { - out.printerr("Forgetting job %d (%s): holder building has too many jobs.", + out.printerr("Forgetting job %d (%s): holder building has too many jobs.\n", pj->id, ENUM_KEY_STR(job_type, pj->job_copy->job_type).c_str()); forget_job(out, pj); return true; @@ -532,7 +532,7 @@ static bool recover_job(color_ostream &out, ProtectedJob *pj) { deleteJobStruct(recovered); - out.printerr("Inconsistency: job %d (%s) already in list.", + out.printerr("Inconsistency: job %d (%s) already in list.\n", pj->id, ENUM_KEY_STR(job_type, pj->job_copy->job_type).c_str()); return true; }