View Issue Details

IDProjectCategoryView StatusLast Update
0000407LDMud 3.3Efunspublic2018-01-29 21:57
ReporterGnomi Assigned Tolars 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi686OSDebian GNU/LinuxOS Version3.1
Product Version3.3 
Fixed in Version3.3 
Summary0000407: bind_lambda doesn't ignore unbindable closures when the second arg is missing
DescriptionHi,

there is a simple error in v_bind_lambda, which checks sp[1].type == T_NUMBER (as it was in 3.2) instead of num_arg == 1. That's why bind_lambda(lambda(0,0)) throws an error but that shouldn't, because the second argument is missing. A patch is attached.

Greetings,
Gnomi
TagsNo tags attached.
Attached Files
closure.bind_lambda.diff (467 bytes)   
Index: src/closure.c
===================================================================
--- src/closure.c	(Revision 35)
+++ src/closure.c	(Arbeitskopie)
@@ -5887,7 +5887,7 @@
          * throw an error (unless <ob> has been omitted)
          */
         free_object(ob, "bind_lambda");
-        if (sp[1].type == T_NUMBER)
+        if (num_arg == 1)
             break;
         errorf("Bad arg 1 to bind_lambda(): unbindable closure\n");
         /* NOTREACHED */
closure.bind_lambda.diff (467 bytes)   

Activities

lars

2005-11-24 12:03

reporter   ~0000413

Thanks - the patch is in r2223 (3.3.712)

Issue History

Date Modified Username Field Change
2005-10-12 11:03 Gnomi New Issue
2005-10-12 11:03 Gnomi File Added: closure.bind_lambda.diff
2005-11-24 12:03 lars Status new => resolved
2005-11-24 12:03 lars Fixed in Version => 3.3
2005-11-24 12:03 lars Resolution open => fixed
2005-11-24 12:03 lars Assigned To => lars
2005-11-24 12:03 lars Note Added: 0000413
2006-02-28 20:04 lars Status resolved => closed
2010-11-16 09:42 lars Source_changeset_attached => ldmud.git master db8cbf3c
2018-01-29 18:59 lars Source_changeset_attached => ldmud.git master db8cbf3c
2018-01-29 21:57 lars Source_changeset_attached => ldmud.git master db8cbf3c