From 62260a8bca2a03a38e013f74503d7f0401288cc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Tue, 26 Nov 1996 19:47:02 -0800
Subject: [PATCH] more debug added

Rev: src/operators.c:1.4
---
 src/operators.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/operators.c b/src/operators.c
index db57f9012b..0bfa61a7fd 100644
--- a/src/operators.c
+++ b/src/operators.c
@@ -5,7 +5,7 @@
 \*/
 #include <math.h>
 #include "global.h"
-RCSID("$Id: operators.c,v 1.3 1996/11/14 01:36:30 hubbe Exp $");
+RCSID("$Id: operators.c,v 1.4 1996/11/27 03:47:02 hubbe Exp $");
 #include "interpret.h"
 #include "svalue.h"
 #include "multiset.h"
@@ -1102,6 +1102,10 @@ void o_range()
 
       if(from>to+1) from=to+1;
     }
+#ifdef DEBUG
+    if(from < 0 || (to-from+1) < 0)
+      fatal("Error in o_range.\n");
+#endif
 
     s=make_shared_binary_string(sp[-1].u.string->str+from,to-from+1);
     free_string(sp[-1].u.string);
-- 
GitLab