GarageGames/Torque2D — pull request #22 by Alpha-Kand (2013-02-18 17:56:10+00:00)
Title: "Cannot assign a zero batch Id." When clearing and adding sprites to a CompositeSprite

A fatal error occurs when 'mMasterBatch' is equal to zero when adding a
new sprite to a CompositeSprite. Calling the 'ClearSprites' function
sets 'mMasterBatch' to zero and the very next sprite added has batchId
equal to zero causing an error because the '++' came to late. Putting
the '++' in front of 'mMasterBatchId' when initializing 'batchId'
ensures that the 'batchId' is never zero.