Prevent const qualifier being discarded in vfnprintg()
This commit is contained in:
parent
cbf9c22adf
commit
2f82247223
@ -20,6 +20,7 @@ FIX: STM32LTDC driver: Fix bug in gdisp_lld_blit_area() which affected bl
|
||||
FIX: Improve /demos/benchmarks/rectangles.
|
||||
FIX: Win32 driver: Fix buffer position calculation in gdisp_lld_blit_area().
|
||||
FIX: Win32 driver: Fix memory leak / invalid pointer to free() when re-calculating buffer position in a specific situation.
|
||||
FIX: Prevent const qualifier being discarded in vfnprintg()
|
||||
|
||||
|
||||
*** Release 2.9 ***
|
||||
|
@ -54,7 +54,8 @@ static char *ltoa_wd(char *p, long num, unsigned radix, long divisor) {
|
||||
|
||||
int vfnprintg(GFILE *f, int maxlen, const char *fmt, va_list arg) {
|
||||
int ret;
|
||||
char *p, *s, c, filler;
|
||||
char *p, c, filler;
|
||||
const char *s;
|
||||
int i, precision, width;
|
||||
gBool is_long, left_align;
|
||||
long l;
|
||||
@ -80,7 +81,7 @@ int vfnprintg(GFILE *f, int maxlen, const char *fmt, va_list arg) {
|
||||
}
|
||||
fmt++;
|
||||
|
||||
p = s = tmpbuf;
|
||||
s = p = tmpbuf;
|
||||
left_align = gFalse;
|
||||
filler = ' ';
|
||||
width = 0;
|
||||
@ -140,7 +141,7 @@ int vfnprintg(GFILE *f, int maxlen, const char *fmt, va_list arg) {
|
||||
s = "(null)";
|
||||
if (precision == 0)
|
||||
precision = 32767;
|
||||
for (p = s; *p && (--precision >= 0); p++);
|
||||
for (p = (char*)s; *p && (--precision >= 0); p++);
|
||||
break;
|
||||
case 'D':
|
||||
case 'd':
|
||||
|
Loading…
Reference in New Issue
Block a user