From ed975abb65c93a3e816915f3a6a0a6ef4cc0afd2 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 9 Jul 2011 20:41:08 +0000 Subject: [PATCH] Fix a critical font rendering bug git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3762 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 3 +++ configs/stm3210e-eval/nxtext/Make.defs | 6 ++++-- graphics/nxfonts/nxfonts_convert.c | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b0f4905ca..a552284f1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1887,3 +1887,6 @@ by Hal Glenn. * arch/arm/src/lpc17xx: Changes to compile successfully with no serial console (also submitted by Hal Glenn). + * graphics/nxfonts/nxfonts_convert.c: Fixed a critical bug that caused + when renderer some fonts with bits-per-pixel > 8 + diff --git a/configs/stm3210e-eval/nxtext/Make.defs b/configs/stm3210e-eval/nxtext/Make.defs index a144f16ab4..110edb2d7c 100644 --- a/configs/stm3210e-eval/nxtext/Make.defs +++ b/configs/stm3210e-eval/nxtext/Make.defs @@ -48,24 +48,27 @@ ifeq ($(CONFIG_STM32_CODESOURCERYW),y) CROSSDEV = arm-none-eabi- WINTOOL = y ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O1 endif ifeq ($(CONFIG_STM32_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft - MAXOPTIMIZATION = -O2 + MAXOPTIMIZATION = -O1 endif ifeq ($(CONFIG_STM32_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O2 endif ifeq ($(CONFIG_STM32_RAISONANCE),y) # Raisonance RIDE7 under Windows CROSSDEV = arm-none-eabi- WINTOOL = y ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O2 endif ifeq ($(CONFIG_STM32_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin @@ -82,7 +85,6 @@ ifeq ($(WINTOOL),y) ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxtext/$(LDSCRIPT)}" - MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh diff --git a/graphics/nxfonts/nxfonts_convert.c b/graphics/nxfonts/nxfonts_convert.c index 429518cf02..b7b99e78ad 100644 --- a/graphics/nxfonts/nxfonts_convert.c +++ b/graphics/nxfonts/nxfonts_convert.c @@ -279,8 +279,11 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX) dptr++; } } - line += stride; } + + /* Advance to the beginning of the next line in the destination */ + + line += stride; } #endif return OK;