summaryrefslogtreecommitdiffhomepage
path: root/src/demorec.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2023-06-10 17:01:56 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2023-06-10 17:01:56 +0100
commitf84d44d2a9139f3c5b58d7875bc5ef0d94881008 (patch)
tree7f885b63de3b077514063cde275db1a4750ec359 /src/demorec.c
parent1c4318331663b152b0b298bd2c9e5c971506a86b (diff)
Remove some paranoia about missing commands
There's absolutely no reason these ever wouldn't be there.
Diffstat (limited to 'src/demorec.c')
-rw-r--r--src/demorec.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/demorec.c b/src/demorec.c
index 07e51d1..e176ab3 100644
--- a/src/demorec.c
+++ b/src/demorec.c
@@ -246,23 +246,14 @@ bool demorec_recording(void) {
INIT {
cmd_record = con_findcmd("record");
- if (!cmd_record) { // can *this* even happen? I hope not!
- errmsg_errorx("couldn't find \"record\" command");
- return false;
- }
orig_record_cb = con_getcmdcb(cmd_record);
cmd_stop = con_findcmd("stop");
- if (!cmd_stop) {
- errmsg_errorx("couldn't find \"stop\" command");
- return false;
- }
orig_stop_cb = con_getcmdcb(cmd_stop);
if (!find_demorecorder()) {
errmsg_errorx("couldn't find demo recorder instance");
return false;
}
-
- void **vtable = *(void ***)demorecorder;
+ void **vtable = mem_loadptr(demorecorder);
// XXX: 16 is totally arbitrary here! figure out proper bounds later
if (!os_mprot(vtable, 16 * sizeof(void *), PAGE_READWRITE)) {
errmsg_errorsys("couldn't make virtual table writable");