]> git.eshelyaron.com Git - emacs.git/commitdiff
* modules/mod-test/mod-test.c (Fmod_test_sum): Verify there are 2 args.
authorPhilipp Stephani <phst@google.com>
Tue, 24 Nov 2015 19:08:22 +0000 (21:08 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 24 Nov 2015 19:08:22 +0000 (21:08 +0200)
modules/mod-test/mod-test.c

index 44a14dc6fdd97ea4862b557471fc6eab09b801d2..b0c535cdd72c41d7f4960fc03004d7473339745e 100644 (file)
@@ -42,6 +42,8 @@ sum (intmax_t a, intmax_t b)
 static emacs_value
 Fmod_test_sum (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
 {
+  assert (nargs == 2);
+
   intmax_t a = env->extract_integer (env, args[0]);
   intmax_t b = env->extract_integer (env, args[1]);