Browse Source

Merge pull request #4340 from esenapaj/Follow-up-the-PR-#4335

Follow-up the PR #4335 (Debug char, fix compile errors for lcd pins)
pull/1/head
Scott Lahteine 8 years ago
committed by GitHub
parent
commit
d76389b4d1
  1. 4
      Marlin/ultralcd.cpp

4
Marlin/ultralcd.cpp

@ -2741,7 +2741,11 @@ void lcd_update() {
void set_utf_strlen(char* s, uint8_t n) { void set_utf_strlen(char* s, uint8_t n) {
uint8_t i = 0, j = 0; uint8_t i = 0, j = 0;
while (s[i] && (j < n)) { while (s[i] && (j < n)) {
#if ENABLED(MAPPER_NON)
j++;
#else
if ((s[i] & 0xC0u) != 0x80u) j++; if ((s[i] & 0xC0u) != 0x80u) j++;
#endif
i++; i++;
} }
while (j++ < n) s[i++] = ' '; while (j++ < n) s[i++] = ' ';

Loading…
Cancel
Save