changeset 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 0c0f2b107099
children f5b27ef14d73
files src/luan/LuanSource.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;