feat: check for oom in string

This commit is contained in:
2025-11-19 20:38:43 +01:00
parent ecf4113621
commit 114dbc2494
4 changed files with 28 additions and 1 deletions

16
helper.h Normal file
View File

@@ -0,0 +1,16 @@
//
// Created by tilok on 19.11.2025.
//
#ifndef TSTD_HELPER_H
#define TSTD_HELPER_H
#include <stdio.h>
#define OOM(ptr) { \
if(ptr == NULL) { \
puts("Out of memory"); \
exit(137); \
} \
}
#endif //TSTD_HELPER_H