Package: comgt
Version: 0.32-2
Severity: normal
Tags: patch

Unfortunately, I've failed to make 'scripts/command' do timeouts
robustly with abomination of scripting language comgt provides.  Thus
suspicious name ('scripts/cheater').  Rename appropriately as you wish.

Also, depends on #722303 being closed, obviously.

-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
--- ./scripts/command	2015-07-28 02:38:05.000000000 +0300
+++ ./scripts/cheater	2016-07-10 18:43:10.000000000 +0300
@@ -15,6 +15,7 @@
 
 :loop1
     print "Command: "
+    let f=21
     input $x
     let c=len($x)
     if c=1 goto end
@@ -25,8 +26,12 @@
     :loop2
         print $a
         get 1 "^m" $a
-        let a=len($a)
-        if a > 0 goto loop2
-    goto loop1
+        if len($a) > 0 let f=21
+        if len($a) > 0 goto loop2
+        dec f
+        testkey
+        if % = 1 goto loop1
+        if f = 0 goto loop1
+    goto loop2
 :end
 print "#################\n"

Reply via email to