Created
August 26, 2014 20:13
-
-
Save zsx/9c8628db9bcded698b5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/n-control.c b/src/core/n-control.c | |
index e927576..29acd80 100644 | |
--- a/src/core/n-control.c | |
+++ b/src/core/n-control.c | |
@@ -764,6 +764,13 @@ got_err: | |
} | |
else { // do func[error] arg | |
REBVAL arg = *DS_NEXT; // will get overwritten | |
+ REBSER *words = VAL_FUNC_WORDS(&value); | |
+ REBVAL *args = BLK_SKIP(words, 1); | |
+ if (SERIES_TAIL(words) != 2 | |
+ || !TYPE_CHECK(args, VAL_TYPE(&value))) { | |
+ Trap_Arg(&value); | |
+ } | |
+ | |
Apply_Func(0, &value, &arg, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment