Fix CBMEM console overflow

In CBMEM console, cursor increments past the buffer size to
indicate the number of characters missing from log output.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
diff --git a/src/fw/coreboot.c b/src/fw/coreboot.c
index 5b7e77a..cc316df 100644
--- a/src/fw/coreboot.c
+++ b/src/fw/coreboot.c
@@ -208,9 +208,9 @@
         return;
     if (!cbcon)
         return;
-    if (cbcon->buffer_cursor == cbcon->buffer_size)
-        return;
-    cbcon->buffer_body[cbcon->buffer_cursor++] = c;
+    u32 cursor = cbcon->buffer_cursor++;
+    if (cursor < cbcon->buffer_size)
+        cbcon->buffer_body[cursor] = c;
 }
 
 /****************************************************************