- le_int32 outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups);
+
+ le_int32 outCharCount;
+ if (fVersion2) {
+ outCharCount = IndicReordering::v2process(&chars[offset], count, fScriptCode, outChars, glyphStorage);
+ } else {
+ outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups, success);
+ }
+
+ if (LE_FAILURE(success)) {
+ LE_DELETE_ARRAY(outChars);
+ return 0;
+ }