diff options
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -565,10 +565,7 @@ static int pushline (lua_State *L, int firstline) { | |||
565 | l = strlen(b); | 565 | l = strlen(b); |
566 | if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ | 566 | if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ |
567 | b[--l] = '\0'; /* remove it */ | 567 | b[--l] = '\0'; /* remove it */ |
568 | if (firstline && b[0] == '=') /* for compatibility with 5.2, ... */ | 568 | lua_pushlstring(L, b, l); |
569 | lua_pushfstring(L, "return %s", b + 1); /* change '=' to 'return' */ | ||
570 | else | ||
571 | lua_pushlstring(L, b, l); | ||
572 | lua_freeline(b); | 569 | lua_freeline(b); |
573 | return 1; | 570 | return 1; |
574 | } | 571 | } |