aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/printf.c b/src/printf.c
index a190a1017..2ed674a88 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -228,6 +228,7 @@ static int vxprintf(
int nsd; /* Number of significant digits returned */
#endif
+ func(arg,"",0);
count = length = 0;
bufpt = 0;
for(; (c=(*fmt))!=0; ++fmt){
@@ -684,9 +685,11 @@ static void mout(void *arg, const char *zNewText, int nNewChar){
}
}
}
- if( pM->zText && nNewChar>0 ){
- memcpy(&pM->zText[pM->nChar], zNewText, nNewChar);
- pM->nChar += nNewChar;
+ if( pM->zText ){
+ if( nNewChar>0 ){
+ memcpy(&pM->zText[pM->nChar], zNewText, nNewChar);
+ pM->nChar += nNewChar;
+ }
pM->zText[pM->nChar] = 0;
}
}