From aee3f97acb3efd5e020f59ed89c9036c58721850 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 29 Jan 1998 13:59:35 -0200 Subject: put back quotes (") when string in dostring ends with a \n --- ldo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ldo.c b/ldo.c index 08312511..4cde29c1 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 1.22 1998/01/27 21:21:27 roberto Exp roberto $ +** $Id: ldo.c,v 1.23 1998/01/28 17:47:05 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -401,7 +401,10 @@ int lua_dostring (char *str) if (str == NULL) return 1; sprintf(name, "(dostring) >> \"%." SSIZE_PREF "s\"", str); temp = strchr(name, '\n'); - if (temp) *temp = 0; /* end string after first line */ + if (temp) { /* end string after first line */ + *temp = '"'; + *(temp+1) = 0; + } luaZ_sopen(&z, str, name); status = do_main(&z, 0); return status; -- cgit v1.2.3-55-g6feb