View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002860 | FSSCP | scripting | public | 2013-05-01 00:29 | 2013-05-04 05:06 |
Reporter | Admiral MS | Assigned To | Admiral MS | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.19 | ||||
Summary | 0002860: Tostring function for enumerations returns invalid for highest enumeration index | ||||
Description | The tostring() function for enumerations returns invalid for the enumration with the highest index (not to confuse with the c++ index of the enumeration array). | ||||
Tags | No tags attached. | ||||
|
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; |
|
Fix committed to trunk@9670. |
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 |