Skip to content

Commit fb1a35f

Browse files
authored
Add files via upload
Fixed a bug (Fence Post error) in the Display Customer character command that allowed the user to request a ninth character when only 8 are allowed. The upper limit in the if statement was off by one. The allowable range should be 35 to 42, inclusive, not 35 to 43.
1 parent 26d2571 commit fb1a35f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

firmware/OpenLCD/OpenLCD.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ void updateDisplay()
262262
modeRecordCustomChar = true; //Change to this special mode
263263
}
264264

265-
//Display custom characters
266-
else if (incoming >= 35 && incoming <= 43)
265+
//Display custom characters, 8 characters allowed, 35 to 42 inclusive
266+
else if (incoming >= 35 && incoming <= 42)
267267
{
268268
SerLCD.write(byte(incoming - 35)); //You write location zero to display customer char 0
269269
}
@@ -438,4 +438,4 @@ void displayFrameBuffer(void)
438438

439439
//Return the cursor to its original position
440440
SerLCD.setCursor(characterCount % settingLCDwidth, characterCount / settingLCDwidth);
441-
}
441+
}

0 commit comments

Comments
 (0)