mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Fix zero stripping in %g number formatting.
Reported by pwnhacker0x18. #1149
This commit is contained in:
parent
f2336c48fa
commit
343ce0edaf
@ -454,7 +454,8 @@ static char *lj_strfmt_wfnum(SBuf *sb, SFormat sf, lua_Number n, char *p)
|
||||
prec--;
|
||||
if (!i) {
|
||||
if (ndlo == ndhi) { prec = 0; break; }
|
||||
lj_strfmt_wuint9(tail, nd[++ndlo]);
|
||||
ndlo = (ndlo + 1) & 0x3f;
|
||||
lj_strfmt_wuint9(tail, nd[ndlo]);
|
||||
i = 9;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user