public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8854852
)
vt: Fixes for the simple vt code
author
Alan Cox
<alan@linux.intel.com>
Thu, 18 Dec 2014 11:55:47 +0000
(11:55 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Thu, 18 Dec 2014 11:55:47 +0000
(11:55 +0000)
Work around what appears to be an sdcc bug
Allow cursor_off to be called first without writing over address 0
Kernel/vt.c
patch
|
blob
|
history
diff --git
a/Kernel/vt.c
b/Kernel/vt.c
index
bd2e799
..
71353f9
100644
(file)
--- a/
Kernel/vt.c
+++ b/
Kernel/vt.c
@@
-216,12
+216,14
@@
static unsigned char csave;
static uint8_t *char_addr(unsigned int y1, unsigned char x1)
{
- return VT_BASE + VT_WIDTH * y1 + x1;
+ /* See SDCC bug #2332 */
+ return VT_BASE + VT_WIDTH * y1 + (uint16_t)x1;
}
void cursor_off(void)
{
- *cpos = csave;
+ if (cpos)
+ *cpos = csave;
}
void cursor_on(int8_t y, int8_t x)