fixed LF interpretation


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2054 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/console.c b/console.c
index 0dfed71..f039dfc 100644
--- a/console.c
+++ b/console.c
@@ -619,7 +619,6 @@
     TextCell *c;
     int x, y1;
 
-    s->x = 0;
     s->y++;
     if (s->y >= s->height) {
         s->y = s->height - 1;
@@ -773,6 +772,7 @@
             break;
         case '\t':  /* tabspace */
             if (s->x + (8 - (s->x % 8)) > s->width) {
+                s->x = 0;
                 console_put_lf(s);
             } else {
                 s->x = s->x + (8 - (s->x % 8));
@@ -791,8 +791,10 @@
             c->t_attrib = s->t_attrib;
             update_xy(s, s->x, s->y);
             s->x++;
-            if (s->x >= s->width)
+            if (s->x >= s->width) {
+                s->x = 0;
                 console_put_lf(s);
+            }
             break;
         }
         break;