Skip to content

Commit 4424c35

Browse files
andy-shevojeda
authored andcommitted
auxdisplay: lcd2s: Fix lcd2s_redefine_char() feature
It seems that the lcd2s_redefine_char() has never been properly tested. The buffer is filled by DEF_CUSTOM_CHAR command followed by the character number (from 0 to 7), but immediately after that these bytes are rewritten by the decoded hex stream. Fix the index to fill the buffer after the command and number. Fixes: 8c9108d ("auxdisplay: add a driver for lcd2s character display") Cc: Lars Poeschel <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> [fixed typo in commit message] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 7e57714 commit 4424c35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/auxdisplay/lcd2s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static int lcd2s_redefine_char(struct charlcd *lcd, char *esc)
238238
if (buf[1] > 7)
239239
return 1;
240240

241-
i = 0;
241+
i = 2;
242242
shift = 0;
243243
value = 0;
244244
while (*esc && i < LCD2S_CHARACTER_SIZE + 2) {

0 commit comments

Comments
 (0)