summaryrefslogtreecommitdiff
path: root/nuttx/drivers/lcd
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-19 01:21:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-19 01:21:55 +0000
commit4ee8e4abfb4fb9e46ea6ce2e3685312a684c67d5 (patch)
tree0a7e71ed7bceaa2c07be9883a61612d5025fe22c /nuttx/drivers/lcd
parent6307d71a343657595bac35731061dab9e9937c65 (diff)
downloadpx4-nuttx-4ee8e4abfb4fb9e46ea6ce2e3685312a684c67d5.tar.gz
px4-nuttx-4ee8e4abfb4fb9e46ea6ce2e3685312a684c67d5.tar.bz2
px4-nuttx-4ee8e4abfb4fb9e46ea6ce2e3685312a684c67d5.zip
Minor fix to OLED logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3524 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/lcd')
-rwxr-xr-xnuttx/drivers/lcd/ug-9664hswag01.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/drivers/lcd/ug-9664hswag01.c b/nuttx/drivers/lcd/ug-9664hswag01.c
index b68aef3b8..bb49f20e6 100755
--- a/nuttx/drivers/lcd/ug-9664hswag01.c
+++ b/nuttx/drivers/lcd/ug-9664hswag01.c
@@ -296,7 +296,7 @@ static inline void up_clear(FAR struct ug_dev_s *priv);
* if there are multiple LCD devices, they must each have unique run buffers.
*/
-static uint8_t g_runbuffer[UG_XSTRIDE];
+static uint8_t g_runbuffer[UG_XSTRIDE+1];
/* This structure describes the overall LCD video controller */
@@ -701,12 +701,16 @@ static int ug_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
*buffer |= usrmask;
}
- /* Inc/Decrement to the next destination pixel */
+ /* Inc/Decrement to the next destination pixel. Hmmmm. It looks like
+ * this logic could write past the end of the user buffer. Revisit
+ * this!
+ */
#ifdef CONFIG_NX_PACKEDMSFIRST
if (usrmask == LS_BIT)
{
buffer++;
+ *buffer = 0;
usrmask = MS_BIT;
}
else