summaryrefslogtreecommitdiff
path: root/include/log.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-12 14:51:41 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-12 14:51:41 +0200
commitd174d803de2296061731c3698980a6a51e6fc3ef (patch)
tree27cf4a1d2e5c8d7ec98b3c88641d2fc4e231543d /include/log.hpp
parent12f306e2144081e00c36ed9942068462604bef55 (diff)
fix invoice savefile overflow
Diffstat (limited to 'include/log.hpp')
-rw-r--r--include/log.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/log.hpp b/include/log.hpp
new file mode 100644
index 0000000..dcb2987
--- /dev/null
+++ b/include/log.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "imgui.h"
+#include "config.hpp"
+
+#define MAX_LEN_LOG_HISTORY 256
+#define MAX_LEN_LOG_TXT 128
+
+typedef struct {
+ u32 write_cursor;
+ u32 history_length;
+ char history[MAX_LEN_LOG_HISTORY][MAX_LEN_LOG_TXT];
+} log;
+
+void log_add(double timestamp, const char* fmt, ...) IM_FMTARGS(2); \ No newline at end of file