From 3232d35cfe8199e4fbcfd528a8460ddb38337e06 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Sat, 17 May 2014 13:02:24 +0100
Subject: [PATCH] [Add] DEBUG_PARANOID should abort on Lua DEBUG statements.

---
 src/lluadef.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lluadef.h b/src/lluadef.h
index b3d2639..1bba993 100644
--- a/src/lluadef.h
+++ b/src/lluadef.h
@@ -6,8 +6,13 @@
 
 /* Debug stuff. */
 #ifdef NODEBUG
+#ifdef DEBUG_PARANOID
+#define LLUA_DEBUF(str, args...) \
+  (fprintf(stdout, "Lua: "str"\n, ## args), abort())
+#else
 #define LLUA_DEBUG(str, args...) \
   (fprintf(stdout, "Lua: "str"\n", ## args))
+#endif
 
 #define LLUA_INVALID_PARAMETER() { \
   LLUA_DEBUG("[%s] Invalid parameter (%s:%d)", __func__, __FILE__, __LINE__); \