repair for raise-result-arity-error

Classic misuse of provided string as a formatting template.

Closes #2040
This commit is contained in:
Matthew Flatt 2018-04-13 06:32:26 +02:00
parent 09dc3940b0
commit fb635c0d97
2 changed files with 2 additions and 1 deletions

View File

@ -2126,6 +2126,7 @@
(err/rt-test (raise-result-arity-error #f (expt 2 100) #f) exn:fail:contract:arity?)
(err/rt-test (raise-result-arity-error #f (expt 2 100) "\n in: extra") exn:fail:contract:arity?)
(err/rt-test (raise-result-arity-error #f (expt 2 100) "\n in: extra" 1 2 3 4 5) exn:fail:contract:arity?)
(err/rt-test (raise-result-arity-error 'oops 5 "%") exn:fail:contract:arity?)
(define (exn:fail:contract:arity?/#f e) (not (exn:fail:contract:arity? e)))

View File

@ -3055,7 +3055,7 @@ static Scheme_Object *raise_result_arity_error(int argc, Scheme_Object *argv[])
scheme_wrong_return_arity(where, expected,
argc-3, got_argv,
detail,
(detail ? "%s" : NULL), detail,
NULL);
return scheme_void;