Fix bug compiling funcalls
authorDavid Vázquez <davazp@gmail.com>
Thu, 25 Apr 2013 17:18:36 +0000 (18:18 +0100)
committerDavid Vázquez <davazp@gmail.com>
Thu, 25 Apr 2013 17:18:36 +0000 (18:18 +0100)
src/compiler.lisp

index a59dc3a..5cabe76 100644 (file)
@@ -1,6 +1,6 @@
 ;;; compiler.lisp --- 
 
-;; Copyright (C) 2012, 2013 David Vazquez
+;; copyright (C) 2012, 2013 David Vazquez
 ;; Copyright (C) 2012 Raimon Grau
 
 ;; This program is free software: you can redistribute it and/or
 (defun compile-funcall (function args)
   (let* ((values-funcs (if *multiple-value-p* "values" "pv"))
          (arglist (concat "(" (join (cons values-funcs (mapcar #'ls-compile args)) ", ") ")")))
+    (unless (or (symbolp function)
+                (and (consp function)
+                     (eq (car function) 'lambda)))
+      (error "Bad function"))
     (cond
       ((translate-function function)
        (concat (translate-function function) arglist))