summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console-client/ChangeLog4
-rw-r--r--console-client/driver.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/console-client/ChangeLog b/console-client/ChangeLog
index bd13d98e..5801e34a 100644
--- a/console-client/ChangeLog
+++ b/console-client/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-22 Marcus Brinkmann <marcus@gnu.org>
+
+ * driver.c (driver_start): Don't underflow I.
+
2004-09-29 Alfred M. Szmidt <ams@kemisten.nu>
* Makefile (vga-CPPFLAGS): New variable.
diff --git a/console-client/driver.c b/console-client/driver.c
index 15b6f185..0c1834d2 100644
--- a/console-client/driver.c
+++ b/console-client/driver.c
@@ -258,8 +258,11 @@ driver_start (char **name)
if (err)
{
*name = driver_list[i].name;
- while (--i >= 0)
- (*driver_list[i].ops->fini) (driver_list[i].handle, 1);
+ while (i > 0)
+ {
+ i--;
+ (*driver_list[i].ops->fini) (driver_list[i].handle, 1);
+ }
break;
}
}