aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-05 16:55:43 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-05 16:55:43 -0200
commit50b18f60cb31b361dff6af6cde8389352641d7c1 (patch)
tree7cc3f65e351fdc207517b8eba79aa6ced8a1dc54 /lstrlib.c
parentad73e5156e488f48d291cb2ca0ea3dc0c8d3bdd8 (diff)
downloadlua-50b18f60cb31b361dff6af6cde8389352641d7c1.tar.gz
lua-50b18f60cb31b361dff6af6cde8389352641d7c1.tar.bz2
lua-50b18f60cb31b361dff6af6cde8389352641d7c1.zip
detail
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstrlib.c b/lstrlib.c
index a5b0b15f..d2d05a80 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.213 2014/11/04 14:34:43 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.214 2014/11/05 18:50:29 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*/
@@ -1146,7 +1146,7 @@ static void packint (luaL_Buffer *b, lua_Unsigned n,
1146 n >>= NB; 1146 n >>= NB;
1147 buff[islittle ? i : size - 1 - i] = (char)(n & MC); 1147 buff[islittle ? i : size - 1 - i] = (char)(n & MC);
1148 } 1148 }
1149 if (neg) { /* need sign extension (negative number)? */ 1149 if (neg && size > SZINT) { /* negative number need sign extension? */
1150 for (i = SZINT; i < size; i++) /* correct extra bytes */ 1150 for (i = SZINT; i < size; i++) /* correct extra bytes */
1151 buff[islittle ? i : size - 1 - i] = (char)MC; 1151 buff[islittle ? i : size - 1 - i] = (char)MC;
1152 } 1152 }