[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] SF.net SVN: supercollider:[9620] trunk/Source/lang/LangPrimSource/ PyrPrimitive.cpp



Revision: 9620
          http://supercollider.svn.sourceforge.net/supercollider/?rev=9620&view=rev
Author:   danstowell
Date:     2009-12-16 09:02:44 +0000 (Wed, 16 Dec 2009)

Log Message:
-----------
Fix assertion failure, caused by calling asRawInt() on a nil slot value.
Bug was detected by running KDTree unit test; it happens during a call to prObjectCopySeries.

Modified Paths:
--------------
    trunk/Source/lang/LangPrimSource/PyrPrimitive.cpp

Modified: trunk/Source/lang/LangPrimSource/PyrPrimitive.cpp
===================================================================
--- trunk/Source/lang/LangPrimSource/PyrPrimitive.cpp	2009-12-15 21:04:58 UTC (rev 9619)
+++ trunk/Source/lang/LangPrimSource/PyrPrimitive.cpp	2009-12-16 09:02:44 UTC (rev 9620)
@@ -2269,7 +2269,7 @@
 	} else return errWrongType;
 
 	if (IsInt(c)) second = slotRawInt(c);
-	else if (IsNil(c)) second = first < last ? slotRawInt(b) + 1 : slotRawInt(b) - 1;
+	else if (IsNil(c)) second = first < last ? first + 1 : first - 1;
 	else return errWrongType;
 
 	int step = second - first;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/