From f4021bd84ba008fd1a6b1d21a9782b97fb26120f Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 30 May 2022 04:20:26 +0100 Subject: File a complaint about the error message situation --- src/demorec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/demorec.c') diff --git a/src/demorec.c b/src/demorec.c index a7e0486..dc9e899 100644 --- a/src/demorec.c +++ b/src/demorec.c @@ -128,9 +128,9 @@ static void hook_record_cb(const struct con_cmdargs *args) { return; } if (!S_ISDIR(s.st_mode)) { - // duping this warning call to avoid duping the string data, - // very stupid, oh well. if/when we have New And Improved - // Logging this can be tidied up... + // TODO(errmsg): duping this warning call to avoid duping + // the string data, very stupid, oh well. if/when we have + // New And Improved Logging this can be tidied up... con_warn("ERROR: can't record demo: "); con_warn("the path %.*s is not a directory\n", argdirlen, arg); @@ -235,13 +235,15 @@ bool demorec_init(void) { void **vtable = *(void ***)demorecorder; // XXX: 16 is totally arbitrary here! figure out proper bounds later if (!os_mprot(vtable, 16 * sizeof(void *), PAGE_READWRITE)) { + // TODO(errmsg): this is one of the only places I apparently bothered + // to properly log this stuff. really should solve this at some point #ifdef _WIN32 char err[128]; OS_WINDOWS_ERROR(err); #else const char *err = strerror(errno); #endif - con_warn("demorec: couldn't unprotect CDemoRecorder vtable: %s\n", err); + con_warn("demorec: couldn't make memory writable: %s\n", err); return false; } if (!find_recmembers(vtable[vtidx_StopRecording])) { -- cgit v1.2.3