fix for bug #110, the AIOOBE on auto format

This commit is contained in:
benfry
2005-12-01 15:18:28 +00:00
parent c3dcfb7da2
commit 7ee6f7d0fa
2 changed files with 8 additions and 5 deletions

View File

@@ -194,7 +194,7 @@ public class AutoFormat {
c = string[j++] = getchr(); // extra char
while (done == 0) {
c = string[j++] = getchr();
while(c != '/') {
while ((c != '/') && (j < string.length)) {
if(c == '\n' || c == '\r') {
lineNumber++;
putcoms();
@@ -1008,4 +1008,4 @@ public class AutoFormat {
}
return (1);
}
}
}

View File

@@ -12,9 +12,12 @@ X subclasses need to use "public void keyPressed" not "void keyPressed"
X tweak linux version shell script to properly set directory name
X http://dev.processing.org/bugs/show_bug.cgi?id=234
_ bugs in auto-format
_ if an error occurs during format, report it and don't change text
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1117081646
bugs in auto-format
X ArrayIndexOutOfBoundsException when trying to Auto Format
X http://dev.processing.org/bugs/show_bug.cgi?id=110
_ autoformat mangling code
_ http://dev.processing.org/bugs/show_bug.cgi?id=109
_ if an error occurs during format, report it and don't change text
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .