View Issue Details

IDProjectCategoryView StatusLast Update
0002860FSSCPscriptingpublic2013-05-04 05:06
ReporterAdmiral MS Assigned ToAdmiral MS  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.19 
Summary0002860: Tostring function for enumerations returns invalid for highest enumeration index
DescriptionThe tostring() function for enumerations returns invalid for the enumration with the highest index (not to confuse with the c++ index of the enumeration array).
TagsNo tags attached.

Activities

Admiral MS

2013-05-01 00:29

developer  

enum_index.patch (453 bytes)   
Index: code/parse/lua.cpp
===================================================================
--- code/parse/lua.cpp	(revision 9666)
+++ code/parse/lua.cpp	(working copy)
@@ -883,7 +883,7 @@
 	if(!ade_get_args(L, "o", l_Enum.GetPtr(&e)))
 		return ade_set_args(L, "s", "<INVALID>");
 
-	if(e->index < 0 || e->index >= (int)Num_enumerations)
+	if(e->index < 1 || e->index >= ENUM_NEXT_INDEX)
 		return ade_set_args(L, "s", "<INVALID>");
 
 	uint i;
enum_index.patch (453 bytes)   

Zacam

2013-05-04 05:06

administrator   ~0015028

Fix committed to trunk@9670.

Related Changesets

fs2open: trunk r9670

2013-05-04 01:59

Zacam


Ported: N/A

Details Diff
Fix for Mantis 0002860: Tostring function for enumerations returns invalid for highest enumeration index
From: Admiral MS
Affected Issues
0002860
mod - /trunk/fs2_open/code/parse/lua.cpp Diff File

Issue History

Date Modified Username Field Change
2013-05-01 00:29 Admiral MS New Issue
2013-05-01 00:29 Admiral MS Status new => assigned
2013-05-01 00:29 Admiral MS Assigned To => Admiral MS
2013-05-01 00:29 Admiral MS File Added: enum_index.patch
2013-05-01 00:29 Admiral MS Status assigned => code review
2013-05-04 05:06 Zacam Changeset attached => fs2open trunk r9670
2013-05-04 05:06 Zacam Note Added: 0015028
2013-05-04 05:06 Zacam Status code review => resolved
2013-05-04 05:06 Zacam Resolution open => fixed