fixed a logfmt bug
This commit is contained in:
parent
ccca08c725
commit
66af1a8ea3
@ -192,7 +192,7 @@ static int is_normalized_integer (hcl_t* hcl, hcl_oop_t oop)
|
||||
return 0;
|
||||
}
|
||||
|
||||
HCL_INLINE int is_bigint (hcl_t* hcl, hcl_oop_t x)
|
||||
HCL_INLINE static int is_bigint (hcl_t* hcl, hcl_oop_t x)
|
||||
{
|
||||
hcl_oop_t c;
|
||||
|
||||
|
@ -217,7 +217,8 @@ redo:
|
||||
}
|
||||
|
||||
newcapa = HCL_ALIGN(hcl->log.len + len, 512); /* TODO: adjust this capacity */
|
||||
tmp = hcl_reallocmem (hcl, hcl->log.ptr, newcapa * HCL_SIZEOF(*tmp));
|
||||
/* +1 to handle line ending injection more easily */
|
||||
tmp = hcl_reallocmem (hcl, hcl->log.ptr, (newcapa + 1) * HCL_SIZEOF(*tmp));
|
||||
if (!tmp)
|
||||
{
|
||||
if (hcl->log.len > 0)
|
||||
@ -231,7 +232,7 @@ redo:
|
||||
}
|
||||
|
||||
hcl->log.ptr = tmp;
|
||||
hcl->log.capa = newcapa - 1; /* -1 to handle line ending injection more easily */
|
||||
hcl->log.capa = newcapa;
|
||||
}
|
||||
|
||||
while (len > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user