diff --git a/index.html b/index.html index 462e4da..0777ff8 100644 --- a/index.html +++ b/index.html @@ -364,8 +364,8 @@ but this will cause an error:

This enables using many preprocessor tricks, like creating an assert() macro similar to that in C:

-
#define assert(x) do { if (DEBUG && !(x)) \
-  llOwnerSay("ASSERTION FAILED: " #x); } while (0)
+
#define assert(...) do { if (DEBUG) if (__VA_ARGS__) ; \
+  else llOwnerSay("ASSERTION FAILED: " #__VA_ARGS__); } while (0)
 

without worrying about the extra memory that it will take in production code once DEBUG is switched off, or about the loop taking up actual code memory.