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; isSanskrit = false;
} }
else { //could not convert - throw exception else { //could not convert - throw exception
if (start+5 < wylie.length()) // FIXME: we're printing to stdout!
System.out.println("Bad wylie: "+wylie.substring(start,5)); // FIXME: we're printing to stdout! if (start+5 <= wylie.length()) {
else System.out.println("Bad wylie: "
+ wylie.substring(start,
start + 5));
} else {
System.out.println("Bad wylie: "+wylie.substring(start)); System.out.println("Bad wylie: "+wylie.substring(start));
}
throw new InvalidWylieException(wylie, start); throw new InvalidWylieException(wylie, start);
} }
} }