]> git.webhop.me Git - lcd4linux.git/commitdiff
fix for a bug introduced in the DE-LD021 driver
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 5 Jan 2011 03:49:07 +0000 (03:49 +0000)
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 5 Jan 2011 03:49:07 +0000 (03:49 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1140 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

drv_MatrixOrbital.c

index 5f6fd1539c152f26b52c9640c76af5553c9fb104..6988cfd7fa848c03ca93d573f71be2c56f4d2808 100644 (file)
@@ -325,10 +325,10 @@ static int drv_MO_start(const char *section, const int quiet)
        Model = -1;
     }
 
-    if (Models[i].protocol == 3) {     // Sure electronics USB LCD board - full line output
+    if (Model != -1 && Models[Model].protocol == 3) {  // Sure electronics USB LCD board - full line output
        int i, j;
-       for (i = 0; i < Models[i].rows; i++) {  // Clear buffer
-           for (j = 0; j < Models[i].cols; j++) {
+       for (i = 0; i < Models[Model].rows; i++) {      // Clear buffer
+           for (j = 0; j < Models[Model].cols; j++) {
                dispBuffer[i][j] = ' ';
            }
        }