diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-12-21 19:19:15 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-12-22 10:40:22 -0500 |
commit | 1cc809fe0d6ed0af4f91a6d187ae463d06e7d47a (patch) | |
tree | 0bd752d88d3f4e7c0d9bbd84184f10a8a48caa3c /src | |
parent | 8615f62037406ba27b9a5e868db30a8a05ca3a4e (diff) | |
download | seabios-hppa-1cc809fe0d6ed0af4f91a6d187ae463d06e7d47a.zip seabios-hppa-1cc809fe0d6ed0af4f91a6d187ae463d06e7d47a.tar.gz seabios-hppa-1cc809fe0d6ed0af4f91a6d187ae463d06e7d47a.tar.bz2 |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/fw/coreboot.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ void coreboot_debug_putc(char c) 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; } /**************************************************************** |