diff --git a/lib/m-string.c b/lib/m-string.c index d248c280..bdfed4d1 100644 --- a/lib/m-string.c +++ b/lib/m-string.c @@ -94,11 +94,13 @@ static int read_fill_modelserial(void) ch = temp_device_serial[0]; while (ch != '\0') { - ch = temp_device_serial[curr]; if (!isalnum(ch)) { flag = 1; } - curr++; + ch = temp_device_serial[++curr]; + if (ch == '\n') { + ch = temp_device_serial[++curr]; + } } if (ret || flag) {