View Issue Details

IDProjectCategoryView StatusLast Update
0002459FSSCPscriptingpublic2011-06-27 12:49
Reporterm_m Assigned ToThe_E  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version3.6.13 
Summary0002459: Calling ts.createParticle with an invalid effect handle causes an Int3()
DescriptionEverything said in the title. I attached a patch that will instead show a LuaError so a script developer can hunt down that error instead of having a plain CTD.
TagsNo tags attached.

Activities

2011-06-25 13:54

 

createParticlePatch.patch (440 bytes)   
Index: code/parse/lua.cpp
===================================================================
--- code/parse/lua.cpp	(revision 7267)
+++ code/parse/lua.cpp	(working copy)
@@ -12221,6 +12221,11 @@
 				pi.type = PARTICLE_SMOKE2;
 				break;
 			case LE_PARTICLE_BITMAP:
+				if (pi.optional_data < 0)
+				{
+					LuaError(L, "Invalid texture specified for createParticle()!");
+				}
+
 				pi.type = PARTICLE_BITMAP;
 				break;
 		}
createParticlePatch.patch (440 bytes)   

The_E

2011-06-27 12:49

administrator   ~0012728

Added to trunk in revision 7272

Issue History

Date Modified Username Field Change
2011-06-25 13:54 m_m New Issue
2011-06-25 13:54 m_m File Added: createParticlePatch.patch
2011-06-27 12:49 The_E Note Added: 0012728
2011-06-27 12:49 The_E Status new => resolved
2011-06-27 12:49 The_E Fixed in Version => 3.6.13
2011-06-27 12:49 The_E Resolution open => fixed
2011-06-27 12:49 The_E Assigned To => The_E