hack workaround for the // bug

This commit is contained in:
benfry
2004-06-21 22:00:58 +00:00
parent 3127eec2d6
commit 86e6a83bcc
2 changed files with 20 additions and 4 deletions

View File

@@ -77,6 +77,12 @@ public class PdePreprocessor {
*/
public String write(String program, String buildPath, String name,
String extraImports[]) throws java.lang.Exception {
// if the program ends with a comment, and no CR or LF
// an OutOfMemoryError will happen.. not gonna track down the
// bug now, so here's a hack for it:
if (program.endsWith("//")) {
program += "\n";
}
if (PdePreferences.getBoolean("compiler.substitute_unicode")) {
// check for non-ascii chars (these will be/must be in unicode format)