diff src/luan/LuanSource.java @ 53:54a61d1dc070

minor git-svn-id: https://luan-java.googlecode.com/svn/trunk@54 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Mon, 31 Dec 2012 07:38:09 +0000
parents 28dfd91a816c
children 1f8b6edc2b08
line wrap: on
line diff
--- a/src/luan/LuanSource.java	Mon Dec 31 03:15:20 2012 +0000
+++ b/src/luan/LuanSource.java	Mon Dec 31 07:38:09 2012 +0000
@@ -20,7 +20,7 @@
 				throw new NullPointerException("source is null");
 			this.source = source;
 			this.start = start;
-			while( Character.isWhitespace(source.text.charAt(end-1)) ) {
+			while( end > 0 && Character.isWhitespace(source.text.charAt(end-1)) ) {
 				end--;
 			}
 			this.end = end;