diff options
Diffstat (limited to 'logo/src/xlogo/kernel/userspace/procedures/Procedure.java')
-rw-r--r-- | logo/src/xlogo/kernel/userspace/procedures/Procedure.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/logo/src/xlogo/kernel/userspace/procedures/Procedure.java b/logo/src/xlogo/kernel/userspace/procedures/Procedure.java index f96975c..2e0ec38 100644 --- a/logo/src/xlogo/kernel/userspace/procedures/Procedure.java +++ b/logo/src/xlogo/kernel/userspace/procedures/Procedure.java @@ -283,18 +283,10 @@ public class Procedure instr.append("\\l"); instr.append(lineNumber); instr.append(" "); - while (bfr.ready()) + while (bfr.ready() && (line = bfr.readLine()) != null) { lineNumber++; - // read the line - try - { - line = bfr.readLine().trim(); - } - catch (NullPointerException e1) - { - break; - } + line = line.trim(); // delete comments line = deleteComments(line); line = Utils.decoupe(line).toString().trim(); |