Indizierungen ueber Arraygrenzen hinaus entfernt.
Change-Id: I72ed8701e8e8b7e2b81111a4c789efd8691d27fd
diff --git a/std/shells/magier/fileview.c b/std/shells/magier/fileview.c
index 6b41b71..0c08dee 100644
--- a/std/shells/magier/fileview.c
+++ b/std/shells/magier/fileview.c
@@ -675,11 +675,12 @@
rexpr=args[0];
if (catch(regexp(({""}),rexpr))||!regexp(({""}),rexpr))
return printf("grep: Ungueltiger Suchausdruck: %s\n",rexpr) ,1;
- args=args[1..];
+ args=(sizeof(args)>1 ? args[1..] : ({}) );
if (flags&GREP_M)
{
mask=args[<1];
- args=args[0..<2];
+ if (sizeof(args) > 2)
+ args = (sizeof(args) > 1 ? args[0..<2] : ({}) );
}
if (!sizeof(args))
return USAGE("grep [-" GREP_OPTS