fixed the premature termination issue in logfmtv
This commit is contained in:
parent
00e815b8ff
commit
4aa9a711ad
@ -5305,11 +5305,11 @@ static int __execute (moo_t* moo)
|
|||||||
/* it emulates thisContext blockCopy: nargs ofTmprCount: ntmprs */
|
/* it emulates thisContext blockCopy: nargs ofTmprCount: ntmprs */
|
||||||
MOO_ASSERT (moo, moo->sp >= 2);
|
MOO_ASSERT (moo, moo->sp >= 2);
|
||||||
|
|
||||||
MOO_ASSERT (moo, MOO_CLASSOF(moo, MOO_STACK_GETTOP(moo)) == moo->_small_integer);
|
MOO_ASSERT (moo, MOO_OOP_IS_SMOOI(MOO_STACK_GETTOP(moo)));
|
||||||
ntmprs = MOO_OOP_TO_SMOOI(MOO_STACK_GETTOP(moo));
|
ntmprs = MOO_OOP_TO_SMOOI(MOO_STACK_GETTOP(moo));
|
||||||
MOO_STACK_POP (moo);
|
MOO_STACK_POP (moo);
|
||||||
|
|
||||||
MOO_ASSERT (moo, MOO_CLASSOF(moo, MOO_STACK_GETTOP(moo)) == moo->_small_integer);
|
MOO_ASSERT (moo, MOO_OOP_IS_SMOOI(MOO_STACK_GETTOP(moo)));
|
||||||
nargs = MOO_OOP_TO_SMOOI(MOO_STACK_GETTOP(moo));
|
nargs = MOO_OOP_TO_SMOOI(MOO_STACK_GETTOP(moo));
|
||||||
MOO_STACK_POP (moo);
|
MOO_STACK_POP (moo);
|
||||||
|
|
||||||
|
@ -73,16 +73,20 @@
|
|||||||
|
|
||||||
#define PUT_OOCH(c,n) do { \
|
#define PUT_OOCH(c,n) do { \
|
||||||
int xx; \
|
int xx; \
|
||||||
if ((xx = data->putch (moo, data->mask, c, n)) <= -1) goto oops; \
|
if (n > 0) { \
|
||||||
if (xx == 0) goto done; \
|
if ((xx = data->putch (moo, data->mask, c, n)) <= -1) goto oops; \
|
||||||
data->count += n; \
|
if (xx == 0) goto done; \
|
||||||
|
data->count += n; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define PUT_OOCS(ptr,len) do { \
|
#define PUT_OOCS(ptr,len) do { \
|
||||||
int xx; \
|
int xx; \
|
||||||
if ((xx = data->putcs (moo, data->mask, ptr, len)) <= -1) goto oops; \
|
if (len > 0) { \
|
||||||
if (xx == 0) goto done; \
|
if ((xx = data->putcs (moo, data->mask, ptr, len)) <= -1) goto oops; \
|
||||||
data->count += len; \
|
if (xx == 0) goto done; \
|
||||||
|
data->count += len; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static int logfmtv (moo_t* moo, const fmtchar_t* fmt, moo_fmtout_t* data, va_list ap, outbfmt_t outbfmt)
|
static int logfmtv (moo_t* moo, const fmtchar_t* fmt, moo_fmtout_t* data, va_list ap, outbfmt_t outbfmt)
|
||||||
|
Loading…
Reference in New Issue
Block a user