diff options
Diffstat (limited to 'teensy')
| -rw-r--r-- | teensy/teensy_mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/teensy/teensy_mem.c b/teensy/teensy_mem.c index 40882a7..8c1022d 100644 --- a/teensy/teensy_mem.c +++ b/teensy/teensy_mem.c @@ -81,6 +81,8 @@ void ty_free_temp_allocs(void) void *ty_alloc(size_t size) { + if (size == 0) + ty_log_fatal(TY_ERR_MEM, "(%s) tried to allocate 0 bytes", __func__); void *ptr = malloc(size); if (!ptr) ty_log_fatal(TY_ERR_MEM, "(%s) ran out of memory", __func__); |
