Fixed a crashing bug that happened upon converting wylie to tibetan.

This commit is contained in:
dchandler 2003-06-03 23:45:15 +00:00
parent 0f724989b5
commit 7d768c9e06

View file

@ -323,10 +323,14 @@ public class TibTextUtils implements THDLWylieConstants {
isSanskrit = false;
}
else { //could not convert - throw exception
if (start+5 < wylie.length())
System.out.println("Bad wylie: "+wylie.substring(start,5)); // FIXME: we're printing to stdout!
else
// FIXME: we're printing to stdout!
if (start+5 <= wylie.length()) {
System.out.println("Bad wylie: "
+ wylie.substring(start,
start + 5));
} else {
System.out.println("Bad wylie: "+wylie.substring(start));
}
throw new InvalidWylieException(wylie, start);
}
}