Index: gc_core/js/lang_core/gc_engine.js ================================================================== --- gc_core/js/lang_core/gc_engine.js +++ gc_core/js/lang_core/gc_engine.js @@ -1122,11 +1122,12 @@ if (dToken.hasOwnProperty("lMorph")) { lMorph = dToken["lMorph"]; } else { if (nLeft !== null) { - lMorph = _oSpellChecker.getMorph(dToken["sValue"].slice(nLeft, nRight)); + let sValue = (nRight !== null) ? dToken["sValue"].slice(nLeft, nRight) : dToken["sValue"].slice(nLeft); + lMorph = _oSpellChecker.getMorph(sValue); if (bMemorizeMorph) { dToken["lMorph"] = lMorph; } } else { lMorph = _oSpellChecker.getMorph(dToken["sValue"]); @@ -1153,11 +1154,12 @@ function g_analyse (dToken, sPattern, sNegPattern="", nLeft=null, nRight=null, bMemorizeMorph=true) { // analyse a token, return True if not in morphologies and in morphologies let lMorph; if (nLeft !== null) { - lMorph = _oSpellChecker.getMorph(dToken["sValue"].slice(nLeft, nRight)); + let sValue = (nRight !== null) ? dToken["sValue"].slice(nLeft, nRight) : dToken["sValue"].slice(nLeft); + lMorph = _oSpellChecker.getMorph(sValue); if (bMemorizeMorph) { dToken["lMorph"] = lMorph; } } else { lMorph = _oSpellChecker.getMorph(dToken["sValue"]);