Skip to content

Commit f11ff89

Browse files
committed
Fix potential UB from small maxnumber2str
1 parent a6d51d7 commit f11ff89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

luaconf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ void *y8_lua_realloc(void *ud, void *ptr, size_t osize, size_t nsize, bool must_
424424
#define LUA_NUMBER_FMT "%d" // used in liolib, which will be broken, but we dn't use it so lol
425425
//#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n).value >> 16, (n).value & 0xFFFF)
426426
#define lua_number2str(s,n) fix16_to_str((n).value, s, 4)
427-
#define LUAI_MAXNUMBER2STR 13
427+
#define LUAI_MAXNUMBER2STR 64
428428

429429

430430
/*

0 commit comments

Comments
 (0)