aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2011-01-05 03:49:07 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2011-01-05 03:49:07 +0000
commit72e1f7501bd6806022b7a33e1424ea2cc7fa4059 (patch)
treed9f61ce9a56caf4cc81f50c76e1052f4939e633d
parentf95cad51ea998c6febe30b9da74bd2852449d3c1 (diff)
downloadlcd4linux-72e1f7501bd6806022b7a33e1424ea2cc7fa4059.tar.gz
fix for a bug introduced in the DE-LD021 driver
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1140 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r--drv_MatrixOrbital.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drv_MatrixOrbital.c b/drv_MatrixOrbital.c
index 5f6fd15..6988cfd 100644
--- a/drv_MatrixOrbital.c
+++ b/drv_MatrixOrbital.c
@@ -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] = ' ';
}
}