diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-02-04 10:54:31 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-02-04 10:54:31 -0200 |
commit | b7dfd18612db1450ee3f8d1ebe2d0b6a3f91ec04 (patch) | |
tree | 6a5c7562984ca584a2024bf979cfa8b5bbb5e84b /lstrlib.c | |
parent | 8efcd411fee4e7103cff7b027fca38290cdaa6f7 (diff) | |
download | lua-b7dfd18612db1450ee3f8d1ebe2d0b6a3f91ec04.tar.gz lua-b7dfd18612db1450ee3f8d1ebe2d0b6a3f91ec04.tar.bz2 lua-b7dfd18612db1450ee3f8d1ebe2d0b6a3f91ec04.zip |
make buffer for format specification a little larger (length modifier
can be larger than 2, e.g. "I64")
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.223 2015/02/04 12:52:57 roberto Exp $ | 2 | ** $Id: lstrlib.c,v 1.222 2015/01/13 17:18:25 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -892,9 +892,8 @@ static int lua_number2strx (lua_State *L, char *buff, const char *fmt, | |||
892 | 892 | ||
893 | /* | 893 | /* |
894 | ** maximum size of each format specification (such as "%-099.99d") | 894 | ** maximum size of each format specification (such as "%-099.99d") |
895 | ** (+2 for length modifiers; +10 accounts for %99.99x plus margin of error) | ||
896 | */ | 895 | */ |
897 | #define MAX_FORMAT (sizeof(FLAGS) + 2 + 10) | 896 | #define MAX_FORMAT 32 |
898 | 897 | ||
899 | 898 | ||
900 | static void addquoted (lua_State *L, luaL_Buffer *b, int arg) { | 899 | static void addquoted (lua_State *L, luaL_Buffer *b, int arg) { |