aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-06 11:59:29 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-06 11:59:29 -0200
commitd444153dbea006f5e0547f27a11256af96ba1829 (patch)
tree4fcac47b99b40fd2eb4312feb24bab0a2aa7c73a
parenta894499566b80a5af20a410d2940f8ea25a5f471 (diff)
downloadlua-d444153dbea006f5e0547f27a11256af96ba1829.tar.gz
lua-d444153dbea006f5e0547f27a11256af96ba1829.tar.bz2
lua-d444153dbea006f5e0547f27a11256af96ba1829.zip
ESC (which starts precompiled code) in C is \33, not \27
-rw-r--r--bugs5
-rw-r--r--lbaselib.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/bugs b/bugs
index c9429268..f7b11a23 100644
--- a/bugs
+++ b/bugs
@@ -259,3 +259,8 @@ Thu Feb 1 11:55:45 EDT 2001
259Fri Feb 2 14:06:40 EDT 2001 259Fri Feb 2 14:06:40 EDT 2001
260>> «while 1 dostring[[print('hello\n')]] end» never reclaims memory 260>> «while 1 dostring[[print('hello\n')]] end» never reclaims memory
261(by Andrew Paton; since 4.0b) 261(by Andrew Paton; since 4.0b)
262
263** lbaselib.c
264Tue Feb 6 11:57:13 EDT 2001
265>> ESC (which starts precompiled code) in C is \33, not \27
266(by Edgar Toernig and lhf; since 4.0b)
diff --git a/lbaselib.c b/lbaselib.c
index 17ce4506..0599d08b 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.20 2001/01/31 19:53:01 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.21 2001/02/02 19:02:40 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -284,7 +284,7 @@ static int luaB_dostring (lua_State *L) {
284 int oldtop = lua_gettop(L); 284 int oldtop = lua_gettop(L);
285 size_t l; 285 size_t l;
286 const char *s = luaL_check_lstr(L, 1, &l); 286 const char *s = luaL_check_lstr(L, 1, &l);
287 if (*s == '\27') /* binary files start with ESC... */ 287 if (*s == '\33') /* binary files start with ESC... */
288 lua_error(L, "`dostring' cannot run pre-compiled code"); 288 lua_error(L, "`dostring' cannot run pre-compiled code");
289 return passresults(L, lua_dobuffer(L, s, l, luaL_opt_string(L, 2, s)), oldtop); 289 return passresults(L, lua_dobuffer(L, s, l, luaL_opt_string(L, 2, s)), oldtop);
290} 290}