aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAakarsh Kashyap <[email protected]>2026-06-29 22:50:59 +0530
committerAakarsh Kashyap <[email protected]>2026-06-29 22:50:59 +0530
commit3d548a8de76c662447d3bff438c96b9f38e51cd2 (patch)
tree6f680965452bbc30be6da1f32c1a027934277d55 /src/main.cpp
parent36db9ebac493aa07a08c8a92a1380d253e05718e (diff)
[bug] error handling bypass
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4959eef..4695d62 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,5 @@
/* main.cpp - reader: RSVP-style terminal word reader */
-#include <thread>
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
@@ -9,6 +8,7 @@
#include <unistd.h>
#include <string>
+#include <thread>
#include <vector>
#include "../include/reader.h"
@@ -26,11 +26,12 @@ main(int argc, char *argv[])
SCPCQueue<char> queue(1024);
cfg = (EditorCfg *)malloc(sizeof(EditorCfg));
- cfg->speed = 250000;
- int& speed = cfg->speed;
if (!cfg)
die("[err]: malloc failed\n");
+ cfg->speed = 250000;
+ int& speed = cfg->speed;
+
enable_raw(cfg);
init_editor(cfg);