bug fix
This commit is contained in:
@@ -284,7 +284,7 @@ fun parseHead(src: String) {
|
||||
|
||||
if scan->hint(0) != "\r"
|
||||
or scan->hint(1) != "\n": {
|
||||
|
||||
|
||||
# Request with no headers or body
|
||||
return {
|
||||
method: method,
|
||||
@@ -333,7 +333,7 @@ fun parseHead(src: String) {
|
||||
assert(char == "\r" and scan->hint(1) == "\n");
|
||||
scan->consume(2); # Consume the final "\r\n"
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
method: method,
|
||||
url: url,
|
||||
|
||||
@@ -30,7 +30,7 @@ static int bin_sliceUp(Runtime *runtime, Object **argv, unsigned int argc, Objec
|
||||
{
|
||||
UNUSED(argc);
|
||||
ASSERT(argc == 3);
|
||||
|
||||
|
||||
ParsedArgument pargs[3];
|
||||
if (!parseArgs(error, argv, argc, pargs, "Bii"))
|
||||
return -1;
|
||||
|
||||
+3
-3
@@ -1121,9 +1121,9 @@ static int runExecutableAtIndex(Runtime *runtime, Error *error,
|
||||
return -1;
|
||||
|
||||
// Get return values
|
||||
int retc = 0;
|
||||
while (retc < MAX_RETS && (rets[retc] = Runtime_Top(runtime, -retc)))
|
||||
retc++;
|
||||
int retc = Runtime_GetFrameStackUsage(runtime);
|
||||
for (int i = 0; i < MIN(retc, MAX_RETS); i++)
|
||||
rets[i] = Runtime_Top(runtime, i-retc+1);
|
||||
|
||||
if (!Runtime_PopFrame(runtime))
|
||||
return -1;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
@type [runtime]
|
||||
|
||||
@bytecode
|
||||
|
||||
PUSHFUN func, 0, "func";
|
||||
CALL 0, 3;
|
||||
|
||||
PUSHVAR "print";
|
||||
CALL 3, 1;
|
||||
POP 1;
|
||||
|
||||
EXIT;
|
||||
func:
|
||||
PUSHINT 1;
|
||||
PUSHINT 2;
|
||||
PUSHINT 3;
|
||||
RETURN 3;
|
||||
|
||||
@output [321]
|
||||
Reference in New Issue
Block a user