Mon, 08 Apr 2013 14:53:58 +0300
LDObject::getIndex was bogus which would cause inlining to crash
ldtypes.cpp | file | annotate | diff | comparison | revisions |
--- a/ldtypes.cpp Mon Apr 08 14:45:28 2013 +0300 +++ b/ldtypes.cpp Mon Apr 08 14:53:58 2013 +0300 @@ -366,9 +366,9 @@ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= long LDObject::getIndex (OpenFile* pFile) { - for (LDObject* obj : pFile->objects) - if (obj == this) - return (&obj - &(pFile->objects[0])); + for (ulong i = 0; i < pFile->objects.size(); ++i) + if (pFile->objects[i] == this) + return i; return -1; } \ No newline at end of file