disallowed fixed point decimal literal with no digit after the point.

fixed a bug in hcl_divnums
This commit is contained in:
2018-03-30 17:37:40 +00:00
parent 2253d09a18
commit e466c6b68a
4 changed files with 15 additions and 6 deletions

View File

@ -233,7 +233,7 @@ hcl_oop_t hcl_divnums (hcl_t* hcl, hcl_oop_t x, hcl_oop_t y)
nv = xv;
hcl_pushtmp (hcl, &y);
hcl_pushtmp (hcl, &yv);
for (i = 0; i < ys; i++)
{
nv = hcl_mulints(hcl, nv, HCL_SMOOI_TO_OOP(10));
@ -244,7 +244,7 @@ hcl_oop_t hcl_divnums (hcl_t* hcl, hcl_oop_t x, hcl_oop_t y)
}
}
nv = hcl_divints(hcl, nv, y, 0, HCL_NULL);
nv = hcl_divints(hcl, nv, yv, 0, HCL_NULL);
hcl_poptmp (hcl);
if (!nv) return HCL_NULL;