Permalink
Browse files

Fixing error line numbering. (Paul Stoffregen)

  • Loading branch information...
1 parent c3d170b commit 795df1e20748e620c7604b421d86f3bef94a93e2 @damellis damellis committed Oct 1, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/src/processing/app/preproc/PdePreprocessor.java
@@ -205,7 +205,8 @@ protected void writeProgram(PrintStream out, String program, List<String> protot
for (int i = 0; i < prototypes.size(); i++) {
out.print(prototypes.get(i) + "\n");
}
- out.println("#line 1");
+ String[] lines = program.substring(0, prototypeInsertionPoint).split("\n", -1);
+ out.println("#line " + (lines.length - 1));
out.print(program.substring(prototypeInsertionPoint));
}

0 comments on commit 795df1e

Please sign in to comment.