summaryrefslogblamecommitdiffstats
blob: 258965d87bfb7590aa1f782db51a1e61ab357cee (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                       
diff --git a/init/util.c b/init/util.c
index 4d98cc2..0667593 100755
--- a/init/util.c
+++ b/init/util.c
@@ -657,8 +657,9 @@ static void get_hardware_name(void)
         if (x) {
             x += 2;
             n = 0;
-            while (*x && !isspace(*x)) {
-                hardware[n++] = tolower(*x);
+            while (*x && *x != '\n') {
+                if (!isspace(*x))
+                    hardware[n++] = tolower(*x);
                 x++;
                 if (n == 31) break;
             }